.NET webbrowser control - Automate entry into pop up login form -


hopefully won't painful...

i trying access website webbrowser control, have tried 2 methods (well actually, lots more googling mixed results) have following problems:

 url = "http://username:password@thewebsite.com"  webbrowser1.navigate(url) 

1: method results in window security pop up, asking me log in company proxy. guess because using username/password website , url navigation attempting input proxy?

if attempt automate/avoid proxy bit doing this:

dim headers string = "proxy-authorization: basic " & convert.tobase64string(system.text.asciiencoding.ascii.getbytes("username:password")) webbrowser1.navigate(url, "", encoding.unicode.getbytes(string.empty), headers) 

i still meet failure proxy log in box pops regardless.

2: if go straight website without editing url:

 url = "http://thewebsite.com"  webbrowser1.navigate(url) 

then takes me teh website without proxy messages @ (great!) website pops log in box need populate. sadly cannot hold of elementids (to automate) windows form pop outside of webbrowser control, , cannot seem interrogate or figure out how input it.

does have ideas should try next? there way login form method 2 either populate or @ least let me view source of page? cannot click away until populated correctly.

i cannot seem work deal both log in forms me, either 1 or other. (both forms windows standard log in prompts, not built webpage). thanks

you'd need implement custom browser control site supporting iserviceprovider , provide iauthenticate service. browser control call iauthenticate implementation whenever needs login credentials.

the following q/a might started, although code in c#:

webbrowser control autheticate not working when access file folder [original spelling preserved].

implement idispatch::invoke called webbrowser control.

[edited] more specifically, you'd need implement iauthenticateex, allow differentiate between proxy , website authentication via authenticateinfo.dwflags.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -