I am using Selenium Webdriver, 2.25 I have a local hub set up with this json setting for chrome and firefox:
[
{
"browserName": "firefox",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "chrome",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
}
],
I can start a webdriver firefox session like this:
capability = getattr(webdriver.DesiredCapabilities, "FIREFOX")
dd=webdriver.Remote('http://localhost:4444/wd/hub', capability)
which works fine
but if I try to start a Chrome session like this:
capability = getattr(webdriver.DesiredCapabilities, "CHROME")
dd=webdriver.Remote('http://localhost:4444/wd/hub', capability)
I get this error:
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py”, line 62, in init
self.start_session(desired_capabilities, browser_profile)
File “/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py”, line 104, in start_session
‘desiredCapabilities’: desired_capabilities,
File “/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py”, line 155, in execute
self.error_handler.check_response(response)
File “/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py”, line 147, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: None ; Stacktrace: Method innerGet threw an error in None
But I can start a direct connection to Chrome like this:
dd=webdriver.Chrome()
Without any problem.
What can I do to get to Chrome through my Selenium Hub?
You need to setup the chrome driver, info about that here
UPDATE
Based on a sample json setup file
and steps provided in the first link, seems like the browser name should not be in Upper but in fact lower case.
So change
CHROMEtochromeExample
and in your case, I would assume