Reputation: 405
I'm pretty sure this'll be a head smacker, but I've followed ever bit of doc I can find and I can't get rid of this error. I'm in the process of setting up a Selenium Grid (in Docker) and can get tests to run only if I don't specify the remote. Here's the code
def setUp(self):
self.browser = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.CHROME)
FWIW, this works fine, but isn't useful in a grid environment without the command_executor:
def setUp(self):
self.browser = webdriver.Chrome()
Based on a number of sources, including https://hackr.io/blog/complete-guide-selenium-webdriver, the call to the RemoteWebDriver should be correct.
Here's the error:
ERROR: test_hackernews_search_for_selenium (__main__.HackerNewsSearchTest)
Traceback (most recent call last):
File "test.py", line 16, in setUp
self.browser = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.CHROME)
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: None
Upvotes: 1
Views: 1444
Reputation: 193318
This error message...
ERROR: test_hackernews_search_for_selenium (__main__.HackerNewsSearchTest)
Traceback (most recent call last):
File "test.py", line 16, in setUp
self.browser = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.CHROME)
.
WebDriverException: Message: None
...implies that the client program was unable to initiate a new WebBrowsing Session i.e. Chrome Browser session.
Your main issue is the connectivity between the Selenium Grid Hub and Selenium Grid Node.
Ensure the following:
Upvotes: 1