Giter Club home page Giter Club logo

Comments (11)

bschollnick avatar bschollnick commented on May 18, 2024 2

(In case someone else runs into this.)
I was seeing the same issue under Windows Server.

seleniumbase install chromedriver

Worked fine, no errors, but seleniumbase would die with "cannot find Chrome Binary".

For some reason, I HAD to use seleniumbase install chromedriver latest.

As soon as I did that, everything worked fine.

from seleniumbase.

mdmintz avatar mdmintz commented on May 18, 2024

Hi @ithjz Have you tried using seleniumbase install chromedriver ? It doesn't seem to be on your path.

from seleniumbase.

mdmintz avatar mdmintz commented on May 18, 2024

Additionally, get the new seleniumbase version 1.15.8 to take care of those deprecation warnings you see, which are related to the version of python used. Also, add a "--upgrade" to your pip install to make sure you have the latest versions of python packages being used: pip install -r requirements.txt --upgrade

from seleniumbase.

mdmintz avatar mdmintz commented on May 18, 2024

@ithjz Now, v1.15.10 should take care of the remaining DeprecationWarnings you saw (https://github.com/seleniumbase/SeleniumBase/pull/209/files), which updated methods that use regular expressions to pass raw strings. Use pip install -U seleniumbase --no-cache-dir to reinstall from pypi, (Or pip install -U -i https://pypi.anaconda.org/seleniumbase/simple seleniumbase if you're using Anaconda Cloud). Then get chromedriver into your seleniumbase drivers folder with seleniumbase install chromedriver.

from seleniumbase.

mdmintz avatar mdmintz commented on May 18, 2024

I haven't heard back in 4 days, so I'll assume this issue is resolved. Please update to the latest version of seleniumbase if you haven't already.

from seleniumbase.

bukowa avatar bukowa commented on May 18, 2024
  ** install **

  Usage:
          seleniumbase install [DRIVER_NAME] [OPTIONS]
              (Drivers: chromedriver, geckodriver, edgedriver,
                        iedriver, operadriver)
  Options:
          VERSION         Specify the version.
                          (Default chromedriver version = 2.44)
                          Use "latest" for the latest version.
          -p OR --path    Also copy the driver to /usr/local/bin

It would be cool to specify custom path!

from seleniumbase.

mdmintz avatar mdmintz commented on May 18, 2024

@bukowa It can always be copied to another location, but these are the safe paths to use. There could be permissions issues, etc, when using other paths. The only time that the seleniumbase/drivers folder isn't good enough is when using a Selenium Grid - that requires the driver to be on the system path. Otherwise, it's safer to use seleniumbase/drivers because then you could have a different version of the browser driver for different virtual environments. If the system path is used, all users would have to use the same driver.

from seleniumbase.

bukowa avatar bukowa commented on May 18, 2024
(venv) (⎈|N/A:default)➜  tests git:(new2) ✗ seleniumbase install chromedriver latest

*** chromedriver version for download = 107.0.5304.62 (Latest)

Downloading chromedriver_linux64.zip from:
https://chromedriver.storage.googleapis.com/107.0.5304.62/chromedriver_linux64.zip ...
Download Complete!

Extracting ['chromedriver'] from chromedriver_linux64.zip ...
Unzip Complete!

The file [chromedriver] was saved to:
/home/buk/Git/k8s-wp/venv/lib/python3.10/site-packages/seleniumbase/drivers/chromedriver

Making [chromedriver 107.0.5304.62] executable ...
[chromedriver 107.0.5304.62] is now ready for use!
(venv) (⎈|N/A:default)➜  tests git:(new2) ✗ pytest .                                
(Linux uses --headless by default. To override, use --headed / --gui. For Xvfb mode instead, use --xvfb. Or hide this info with --headless, or by calling the new --headless2.)
==================================================================================================================== test session starts =====================================================================================================================
platform linux -- Python 3.10.6, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/buk/Git/k8s-wp/tests
plugins: html-2.0.1, metadata-2.0.4, xdist-3.0.2, forked-1.4.0, rerunfailures-10.2, seleniumbase-4.8.2, ordering-0.6
collected 1 item                                                                                                                                                                                                                                             

basic_test.py

FAILED basic_test.py::MyTestClass::test_basics - selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

I wonder why it still doesn't work out of the box with venv :/

from seleniumbase.

bukowa avatar bukowa commented on May 18, 2024

It works with firefox seleniumbase install geckodriver pytest --headed --browser=firefox

from seleniumbase.

mdmintz avatar mdmintz commented on May 18, 2024

@bukowa cannot find Chrome binary means that Chrome wasn't found on your machine. Chrome must be installed separately. (SeleniumBase only downloads the drivers for you.)

from seleniumbase.

bukowa avatar bukowa commented on May 18, 2024

@bukowa cannot find Chrome binary means that Chrome wasn't found on your machine. Chrome must be installed separately. (SeleniumBase only downloads the drivers for you.)

Oh ok thank you

from seleniumbase.

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.