Giter Site home page Giter Site logo

Comments (12)

karan-deep avatar karan-deep commented on June 1, 2024 4

For Mac and using NPM webdriver-manager package,

  1. Download same version of chrome-driver as per your browser version. https://googlechromelabs.github.io/chrome-for-testing/
  2. Go to cd /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium.
  3. Copy downloaded chrome-driver to this folder.
  4. Rename downloaded chrome-driver version with your latest selenium chrome driver version. Ex -> downloaded chrome-driver to chromedriver_114.0.5735.90.
  5. After renaming, convert it to zip folder as well.
  6. Allow Anyway it from Security & Privacy.

Now, you would be using latest chrome driver for selenium with your latest browser. You would not see following error "session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.110 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome".

Don't run webdriver-manager update cmd after renaming otherwise it will overwrite older version of chrome-driver

from webdriver-manager.

StanislavKharchenko avatar StanislavKharchenko commented on June 1, 2024 2

@bboycs The simple solution is to prepare short script which will call selenium-manager, download driver binaries and copy it to node-modules/webdriver-manager/downloads folder (to path where these binaries should actually present)

from webdriver-manager.

i-C-o-d-e-r avatar i-C-o-d-e-r commented on June 1, 2024 2

Inspired by @StanislavKharchenko and @ParmaJonEman proposals, I use this method as a workaround:

  1. Install the NPM package chromedriver as a dev-dependency in package.json
  2. Amend Protractors config file protractor.conf.js by letting chromeDriver point to the Chrome-Driver executable provided by the NPM package. On Windows this is chromeDriver: './node_modules/chromedriver/lib/chromedriver/chromedriver.exe'

from webdriver-manager.

ParmaJonEman avatar ParmaJonEman commented on June 1, 2024 1

What I did to solve this is just write a postinstall node script to hit the "last-known-good-versions-with-downloads" endpoint , download the correct file, and unzip it. I then added the "chromeDriver" parameter to the protractor config file, so that it points to where I download it, instead of attempting to use webdriver-manager.

from webdriver-manager.

StanislavKharchenko avatar StanislavKharchenko commented on June 1, 2024

@dgp1130 ???

from webdriver-manager.

martinharyanto avatar martinharyanto commented on June 1, 2024

I think this is also the same with my problem, today I tried to run webdriver-manager on my phyton code for selenium, and this error appear

Traceback (most recent call last):
  File "/Users/martinharyanto/PycharmProjects/pythonProject/main.py", line 61, in <module>
    main()
  File "/Users/martinharyanto/PycharmProjects/pythonProject/main.py", line 21, in main
    driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/martinharyanto/PycharmProjects/pythonProject/venv/lib/python3.11/site-packages/webdriver_manager/chrome.py", line 39, in install
    driver_path = self._get_driver_binary_path(self.driver)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/martinharyanto/PycharmProjects/pythonProject/venv/lib/python3.11/site-packages/webdriver_manager/core/manager.py", line 33, in _get_driver_binary_path
    file = self._download_manager.download_file(driver.get_driver_download_url())
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/martinharyanto/PycharmProjects/pythonProject/venv/lib/python3.11/site-packages/webdriver_manager/drivers/chrome.py", line 59, in get_driver_download_url
    modern_version_url = self.get_url_for_version_and_platform(driver_version_to_download, os_type)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/martinharyanto/PycharmProjects/pythonProject/venv/lib/python3.11/site-packages/webdriver_manager/drivers/chrome.py", line 94, in get_url_for_version_and_platform
    raise Exception(f"No such driver version {browser_version} for {platform}")
Exception: No such driver version 115.0.5790.114 for mac-arm64

from webdriver-manager.

mdislam04 avatar mdislam04 commented on June 1, 2024

i am also getting the same issue. is some one looking into it?

$ npx webdriver-manager update --gecko=false --versions.chrome 115.0.5790.102
webdriver-manager: using global installed version 12.1.9
[13:14:29] I/config_source - curl -oC:\Users\mohmmad.islam\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\selenium\standalone-response.xml https://selenium-release.storage.googleapis.com/
[13:14:29] I/config_source - curl -oC:\Users\mohmmad.islam\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/
[13:14:30] E/downloader - options.uri is a required argument
[13:14:30] I/update - chromedriver: file exists C:\Users\mohmmad.islam\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\selenium\chromedriver_115.0.5790.102.zip
[13:14:30] I/update - chromedriver: unzipping chromedriver_115.0.5790.102.zip
C:\Users\m\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\built\lib\cmds\update.js:232
throw new Error(Invalid filename: ${path.resolve(outputDir, fileName)});
^

Error: Invalid filename: C:\Users\m\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\selenium\chromedriver_115.0.5790.102.zip
at unzip (C:\Users\m\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\built\lib\cmds\update.js:232:19)
at C:\Users\m\AppData\Local\npm-cache_npx\88020e2694c9921b\node_modules\webdriver-manager\built\lib\cmds\update.js:205:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 1)

Node.js v19.8.1

from webdriver-manager.

bboycs avatar bboycs commented on June 1, 2024

chromedrive changed their endpoint for download the latest chromedriver (115 onwards)

from webdriver-manager.

StanislavKharchenko avatar StanislavKharchenko commented on June 1, 2024

use "selenium-manager" to download latest chromedriver binaries.

from webdriver-manager.

bboycs avatar bboycs commented on June 1, 2024

@StanislavKharchenko do you have idea how to match the "selenium-manager" with protractor ?

from webdriver-manager.

barbara avatar barbara commented on June 1, 2024

@karan-deep I tried this but I still get an error:

Error: SessionNotCreatedError: Unable to create new service: ChromeDriverService
Driver info: driver.version: unknown

Any ideas?

from webdriver-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.