Reputation: 6482
I am using m2e eclipse plugin in 4.2 Juno. I see the selenium-chrome-driver-2.26.0.jar file in my maven dependencies after adding
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.26.0</version>
</dependency>
to my pom.xml file. I get the typical missing driver error
java.lang.IllegalStateException: The path to the driver executable
must be set by the webdriver.chrome.driver system property; ...
The firefox driver works (it's automatic). I am able to successfully update my project with the Maven sub menu when right clicking on the project. The maven dependecy folder is already added to my project's build path. I've looked at posts similar to these with not much luck.
How to add maven repository jars to eclipse buildpath? How to configure Eclipse build path to use Maven dependencies?
Upvotes: 2
Views: 3745
Reputation: 4294
It's not the ChromeDriver class.
You need to download the latest version of chrome driver from here
Extract the zip and you will find a .exe file.
Use the following code
System.setProperty("webdriver.chrome.driver","<path to Chromedriver .exe>");
Else set PATH environment variable pointing to location of ChromeDriver.exe
Upvotes: 1