Can anyone help me that how to run Selenium WebDriver test cases in Chrome?

0 votes

I used the following code

WebDriver driver = new ChromeDriver();

But this is the error:

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

Please help!!!!

Mar 29, 2018 in Selenium by anonymous
253 views

2 answers to this question.

0 votes

Download the executable driver from: ChromeDriver Download

Before creating the driver object use this below code

System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
WebDriver driver = new ChromeDriver();
answered Mar 29, 2018 by nsv999
• 5,090 points
0 votes
  • You first need to download chrome driver executable files. Download the latest chromedriver version from here: https://sites.google.com/a/chromium.org/chromedriver/
  • Use the following code to launch Chrome driver in Selenium:

    • System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
      WebDriver driver = new ChromeDriver();
answered Aug 26 by Abha
• 23,030 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

How to run a group of test cases using TestNG in Selenium Webdriver?

Hey Kajal, TestNG allows you to perform ordered ...READ MORE

answered Jun 12 in Selenium by Abha
• 23,030 points
79 views
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
597 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
903 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
587 views
0 votes
3 answers

How to specify "ENTER" button functionality in Selenium WebDriver code?

using OpenQA.Selenium.Interactions; Actions builder = new Actions(driver); ...READ MORE

answered Feb 12 in Selenium by anonymous
9,008 views
0 votes
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,090 points
2,001 views