Open evenmm opened 2 years ago
same issue here
Same
I found a way how to fix that.
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
/chrome_linux
/chrome_windows.exe
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 degrade your selenium version to 3.141.0 because it gives errors in some cases.
Running Ubuntu 20.04.4 LTS (Focal Fossa).
Code: from webbot import Browser web = Browser()
Error: Traceback (most recent call last): File "./test.py", line 2, in
web = Browser()
File "/home/evenmm/anaconda3/lib/python3.8/site-packages/webbot/webbot.py", line 80, in init
self.driver = webdriver.Chrome(executable_path=driverPath, options=options)
File "/home/evenmm/anaconda3/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 70, in init
super(WebDriver, self).init(DesiredCapabilities.CHROME['browserName'], "goog",
File "/home/evenmm/anaconda3/lib/python3.8/site-packages/selenium/webdriver/chromium/webdriver.py", line 92, in init
RemoteWebDriver.init(
File "/home/evenmm/anaconda3/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 275, in init
self.start_session(capabilities, browser_profile)
File "/home/evenmm/anaconda3/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 365, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/evenmm/anaconda3/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 430, in execute
self.error_handler.check_response(response)
File "/home/evenmm/anaconda3/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created exception: Missing or invalid capabilities
(Driver info: chromedriver=2.39.562737 (dba483cee6a5f15e2e2d73df16968ab10b38a2bf),platform=Linux 5.16.19-76051619-generic x86_64)