Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error about Selenium version #87

Open
eje211 opened this issue Jun 27, 2022 · 1 comment
Open

Error about Selenium version #87

eje211 opened this issue Jun 27, 2022 · 1 comment

Comments

@eje211
Copy link

eje211 commented Jun 27, 2022

I'm using Python 3.9 on macOS. I'm trying to start using webbot, but every time I try, I get this error:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created 
exception: Missing or invalid capabilities
  (Driver info: chromedriver=2.39.562713 
(dd642283e958a93ebf6891600db055f1f1b4f3b2),platform=Mac OS X 10.14.6 x86_64)

I'm using macOS version 10.4 because I use 32 bit software. The part that really puzzles me is why is says chromedriver=2.39.562713. According to the pip, the driver's version is 103.0.5060.53. If I import selenium and try the command help(selenium), towards the end of the output, I get:

VERSION
    4.3.0

Where does this lower version come from? I'm pretty sure that's why I have "missing or invalid capabilities." If I start selenium with:

from selenium import webdriver
driver = webdriver.Chrome()

It starts Chrome as expected. Obviously I'm missing something.

I used to start webbot with:

from webbot import Browser
driver = Browser()

But then, just to be sure, I changed it to:

from webbot import Browser
driver = Browser(True, None, '/usr/local/bin/')

'/usr/local/bin/' being the location of a chrome webdriver installed by brew that is explicitly version 103. No difference.

@codyandersan
Copy link

codyandersan commented Jun 29, 2022

Webbot comes with its own webdriver, which is outdated, so you have to replace that with your own.

First, go to the directory where webbot's source code is stored. (Use webbot.__file__ to get the directory).

Then, open the drivers folder and replace chrome_mac file with your own webdriver.

Now you also don't need to specify your webdriver's path in Browser().

This should solve your problem.

Note:—
You may also need to downgrade your selenium version to 3.141.0 because it gives errors in some cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants