eugenp / tutorials

Just Announced - "Learn Spring Security OAuth":

Home Page:http://bit.ly/github-lsso

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ISSUE] https://www.baeldung.com/java-selenium-webdriver-path-error needs changes per chrome driver > 115 version

vikramvi opened this issue · comments

Article and Module Links
https://www.baeldung.com/java-selenium-webdriver-path-error

Describe the Issue
Please update article with latest Chrome driver ( > 115 ) installation on Mac OS

To Reproduce
Steps to reproduce the behavior:

  1. Went to https://googlechromelabs.github.io/chrome-for-testing/

2 Downloaded mac-x64

  1. Unzipped file and moved "Google Chrome for Testing" to Applications

below code has stopped working

private static ChromeOptions options;

       options = new ChromeOptions();
       options.addArguments("--headless", "--disable-gpu", "--window-size=1920,1200","--ignore-certificate-errors","--disable-extensions","--no-sandbox","--disable-dev-shm-usage");
       
       driver = new ChromeDriver(options);

Expected Behavior

  1. Chrome browser should be launched and start executing script

Screenshots

Screen Shot 2023-12-28 at 7 58 33 AM

Environment (please complete the following information):

  • OS: Mac OS
  • Browser [e.g. chrome, safari] : Chrome driver > 115
  • Version [e.g. 22] > 115

Additional Context

Hey, @vikramvi.

Thanks for the feedback.

This issue will remain open while we look into this.

Hi @vikramvi,

Please follow the below steps :

Initially please just check the version of your browser version by launching Chrome.

  1. Click on the 3 verticle Dots in the upper right corner of the browser.
  2. Scroll down and hover over the help option, Then click on About Google Chrome.
  3. A new window will appear that provides you the information about the browser
    You will get the Version most probably 120.0.6099.xxx (Official Build) (x86_64)

Now go to the https://googlechromelabs.github.io/chrome-for-testing/#stable and follow the below steps:

  1. search your version there 120.0.6099
  2. Choose chromedriver not chrome (in the shared sreeenshot it was Chrome) and download according to your Mac machine in case its processor is Intel go for Platform mac-x64 else mac-arm64
  3. After downloading the correct zip you will find 2 items in the zip :
  • chromedriver
  • Licence.chromedriver

Perform the below steps:

  1. Create a resource folder in the src/test/
  2. Copy the downloaded chromedriver to src/test/resources and rename the chromedriver to chromedriver.exe to make it executable

Now run the ManualSetupLiveTest It will work !!

Let us know in case you face any issues while performing the above steps.

Thanks

As already commented, there's no problem with the article or code and the issue possibly is due to downloading an incorrect driver.