How to run Selenium WebDriver test cases in Chrome?

0
0

I tried this

WebDriver driver = new ChromeDriver();

But i’m getting the error as

Failed tests: setUp(com.TEST): The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see http://code.google.com/p/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://code.google.com/p/chromedriver/downloads/list

How can I make Chrome to test the Selenium-WebDriver test cases?

  • You must to post comments
0
0

You need to download the executable driver from:
ChromeDriver Download

Then all you need to do is use the following before creating the driver object (already shown in the correct order):

System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
WebDriver driver = new ChromeDriver();

This was extracted from the most useful guide at: https://sites.google.com/a/chromium.org/chromedriver/

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Website