webbot icon indicating copy to clipboard operation
webbot copied to clipboard

Error about Selenium version

Open eje211 opened this issue 3 years ago • 1 comments

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.

eje211 avatar Jun 27 '22 03:06 eje211

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.

codyandersan avatar Jun 29 '22 13:06 codyandersan