LambdaTest Community

Find answers, support, and inspiration from other users

Questions
LambdaTest Community
Answered

How to run Selenium WebDriver test cases in Chrome?

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 code here . The latest version can be downloaded from Link

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

Up Vote Down Vote 1 Votes
Posted 5 months ago

Answers


Download update version of chrome driver from Chrome Driver Please Read the Release note as well Here If chrome Browser is updated then you need to downloaded new chormedriver from the above link because it would be compact-able with new browser version.

public class chrome 
 {

  public static void main(String[] args) {

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


    driver.get("http://www.google.com");

  }

 }
Up Vote Down Vote 0 Votes
Posted 5 months ago