1

Following is my code snippet :

public class FindAllElementsFromTable {
    WebDriver  driver;
    @BeforeClass
    public void beforeClass(){
        System.setProperty("Webdriver.chrome.driver","C:\\Selenium Drivers\\chromedriver.exe");
        driver = new ChromeDriver();
    }

and some tests after this.

When executed,getting above exception. I tried with forward slash i.e. "C:/Selenium Drivers/chromedriver.exe" as well, but it makes no difference. I checked other answers, but I haven't made any of those mistakes like initialising the chromedriver twice/wrong place/setting property after WebDriver initialization/wrong driver name etc. Can you help me understanding the exact issue?

Krishnan Mahadevan
  • 13,480
  • 5
  • 33
  • 61
sachin
  • 13
  • 2

1 Answers1

1

You have a typo in your setProperty line.

It should be webdriver not Webdriver

System.setProperty("webdriver.chrome.driver","C:\\Selenium Drivers\\chromedriver.exe");
undetected Selenium
  • 151,581
  • 34
  • 225
  • 281
Fenio
  • 3,269
  • 1
  • 12
  • 24