Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I setup the InternetExplorerDriver so it works

I am using WebDriver and I have downloaded the InternetExplorerDriver and was wondering what I do with it after it is downloaded?

This says to put the driver in my path. Not really certain what exactly they are talking about there.

Has anyone used this and if so could you provide detailed steps on how to set it up so it will work?

I am getting the following error:

The path to the driver executable must be set by the webdriver.ie.driver system property

I downloaded the executables for IE and the Chrome driver. Where do I set it at?

like image 339
DarthOpto Avatar asked Jul 30 '12 19:07

DarthOpto


People also ask

How do you launch IE browser?

To open Internet Explorer 11, select Start , and enter Internet Explorer in Search . Select Internet Explorer (Desktop app) from the results. If you can't find Internet Explorer on your device, you'll need to add it as a feature. Select Start > Search , and enter Windows features.

What is the command to launch Internet Explorer selenium?

setProperty("webdriver. ie. driver", "D:\\IE Driver Server\\IEDriverServer.exe");

How do you launch IE Chrome browser in selenium?

We can launch Chrome browser via Selenium. Java JDK, Eclipse and Selenium webdriver should be installed in the system before Chrome browser is launch. Navigate to the link: https://chromedriver.chromium.org/downloads. Select the Chrome driver link which matches with the Chrome browser in our system.


1 Answers

Unpack it and place somewhere you can find it. In my example, I will assume you will place it to C:\Selenium\iexploredriver.exe

Then you have to set it up in the system. Here is the Java code pasted from my Selenium project:

File file = new File("C:/Selenium/iexploredriver.exe");
System.setProperty("webdriver.ie.driver", file.getAbsolutePath());
WebDriver driver = new InternetExplorerDriver();

Basically, you have to set this property before you initialize driver

Reference:

  • Driver executable must be set by the webdriver.ie.driver system property
like image 134
David Kroukamp Avatar answered Sep 20 '22 16:09

David Kroukamp