Forum Discussion

tigeressxxx's avatar
tigeressxxx
New Contributor
2 years ago

Asking to set chromedriver path using System.setProperty even after updating Selenium-java 4.11.0

Hi,

I am running selenium automation test using ReadyAPI. I removed the System.setProperty(webdriver.chrome.driver", "chromedriver path location") since I added selenium-java 4.11.0. With selenium 4.11.0 we don't need to set chromedriver path but I am getting this error "ERROR: java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property". Am I doing anything incorrect? 

 

 

Thanks in advance

  • TNeuschwanger's avatar
    TNeuschwanger
    Champion Level 1

    Hello tigeressxxx,

     

    Even though you don't need to provide the chromedriver path with that version of Selenium, you still need to invoke the new WebDriverManager setup to replace the line of code you removed.

     

    Have you added the code for WebDriverManager setup by chance?

     

    WebDriverManager.chromedriver().setup();

     

    Regards,

    Todd

    • tigeressxxx's avatar
      tigeressxxx
      New Contributor
      Todd,

      Thanks for your response.
      I had this line in my code before adding selenium-java 4.11.0. As per knowledge when we have selenium-java 4.11.0 we don’t need webdrivermanager as seleniumManager takes care of everything. Same approach I used in selenium automation and it is working fine without specifying chrome driver path.


      Sent from my iPhone