c# - Any way to automate IE *WITHOUT* using webbrowser control? -


i have enterprise app automates many business functions. make heavy use of webbrowser control of web site interactions (web site scraping, web app automation, etc....)

i've come across 2 web sites not render in webbrowser control. specifically:

  • the postal service click-n-ship web app. renders fine until time pay postage. using mouse control within webbrowser control (no automation) not allow me pay postage. submit page hangs forever.

  • the ups quantum view manage web app. page not load in webbrowser control. hangs forever.

both of these render fine in ie10 browser.

i have tried setting registry keys change rendering engine default ie7 ie9. still same results. these web apps not render in webbrowser control.

so....is there way automate ie10 browser c# app? sending messages of sort? need able click links , fill in form data login info , such. advice appreciated...

you use testing tool selenium automate ie. can download ie driver downloads page.

a simple example using google (make sure read instructions on how ie driver working):

openqa.selenium.ie.internetexplorerdriver d = new openqa.selenium.ie.internetexplorerdriver(); d.navigate().gotourl("http://www.google.com");  d.findelementbyname("q").sendkeys("stack"); d.findelementbyname("btnk").click();  webdriverwait waiter = new webdriverwait(d, timespan.fromseconds(10));  waiter.until(expectedconditions.elementexists(by.cssselector(".rc .r a"))); // message first element messagebox.show(d.findelementbycssselector(".rc .r a").text); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -