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
771 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,520 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, 2019 by Abha
• 27,930 points

Related Questions In Selenium

0 votes
1 answer

How to run Selenium test cases in Headless Chrome browser?

@Afreen to run selenium test cases in ...READ MORE

answered May 17, 2019 in Selenium by Kushal
2,156 views
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, 2019 in Selenium by Abha
• 27,930 points
1,221 views
0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

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,520 points
3,829 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,809 views
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,890 points
2,774 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
3,151 views
0 votes
4 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, 2019 in Selenium by anonymous
44,090 views
+1 vote
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,520 points
4,536 views