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

session not created exception: Missing or invalid capabilities #85

Open
evenmm opened this issue May 23, 2022 · 3 comments
Open

session not created exception: Missing or invalid capabilities #85

evenmm opened this issue May 23, 2022 · 3 comments

Comments

@evenmm
Copy link

evenmm commented May 23, 2022

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)

@shasherazi
Copy link

same issue here

@nerux-real
Copy link

nerux-real commented Jun 6, 2022

Same

@codyandersan
Copy link

codyandersan commented Jun 15, 2022

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.

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

4 participants