Chrome driver and ie driver | Selenium Forum
M
Posted on 24/12/2015
hello ,
i am working on module 11.i have loaded drivers for chrome and ie but while executing ie it is giving me an error saying

Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from http://selenium-release.storage.googleapis.com/index.html
at com.google.common.base.Preconditions.checkState(Preconditions.java:197)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:109)
at org.openqa.selenium.ie.InternetExplorerDriverService.access$0(InternetExplorerDriverService.java:1)
at org.openqa.selenium.ie.InternetExplorerDriverService$Builder.findDefaultExecutable(InternetExplorerDriverService.java:167)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)
at org.openqa.selenium.ie.InternetExplorerDriver.setupService(InternetExplorerDriver.java:251)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:172)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:146)
at Drivers.main(Drivers.java:18)

while running on chrome it gives an error saying


Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 8530
Only local connections are allowed.


Request you to please help me in resolving this.

Thanks
Swapna

M
Replied on 24/12/2015

You have to provide full server file path with name of executable file -
System.setProperty("webdriver.ie.driver", "C:\\Users\\Anupam\\Downloads\\Software\\[b:3v4rmep5]IEDriverServer.exe[/b:3v4rmep5]");

while running on chrome it's a message, you just ignore it -

[b:3v4rmep5]Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 8530
Only local connections are allowed.[/b:3v4rmep5]


M
Replied on 01/01/2016

what is the equivalent code for c#? pls give an example


M
Replied on 01/01/2016

System.Environment.SetEnvironmentVariable("webdriver.chrome.driver",@"/path/to/where/you/ve/put/chromedriver.exe")

https://msdn.microsoft.com/en-us/library/z46c489x.aspx