Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internet Explorer automated testing using Selenium C#

I have been looking into using tools for UI testing automatically and seem to have ran into a problem at the first hurdle with Selenium.

It was my understanding that if you used the WebDriver that there was no need for you to setup a Selenium server or anything like this. Basically, all I want to do is create an instance locally of Internet Explorer and control it.

Using this very basic code taken;

var ie = new InternetExplorerDriver();
ie.Navigate().GoToUrl("www.google.co.uk");

I get the following error on the first line;

No response from server for url http://localhost:64333/session

Based on this statement, I am not sure what else I need to do just to get this instance;

Once your project is set up, you can see that WebDriver acts just as any normal library: it is entirely self-contained, and you usually don’t need to remember to start any additional processes or run any installers before using it, as opposed to the proxy server with Selenium-RC.

Suggestions would be appreciated as the WatIn option has come to a halt and I need to see if Selenium can cope with a specific problem in our solution.

Thanks

like image 223
ChrisBint Avatar asked Dec 06 '25 05:12

ChrisBint


2 Answers

Have you configured IE correctly (seems to be the only driver which needs configuration). - http://code.google.com/p/selenium/wiki/InternetExplorerDriver

like image 183
ClearCarbon Avatar answered Dec 08 '25 17:12

ClearCarbon


Try this:

WebDriver driver = new InternetExplorerDriver();
driver.get("www.google.co.uk");

You may also want to turn off UAC and retest if you are stilling seeing this.

like image 35
chrismead Avatar answered Dec 08 '25 18:12

chrismead



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!