public class demo {
@Test
public void openBrowser()
{
System.setProperty("WebDriver.chrome.driver","C://drivers//chromedriver.exe");
// ChromeDriverManager.getInstance().setup();
WebDriver driver=new ChromeDriver();
}
}
The above lines are the code.
This is the error I am facing:
[RemoteTestNG] detected TestNG version 7.3.0
FAILED: openBrowser
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see
https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from
http://chromedriver.storage.googleapis.com/index.html