I have a selenium hub on one of my remote machines and other machines have selenium nodes.
from selenium.webdriver import Remote
from selenium.webdriver import DesiredCapabilities
r = Remote('http://10.10.3.66:4444/wd/hub', DesiredCapabilities.CHROME)
r.get(somewebsite)
10.10.3.66 is the machine that has the hub on it, and I have a local node and a remote one.
Both connected to the remote hub, however chrome doesn't run on remote node but does in local.
I get the following exception when I run the code above (on remote node):
selenium.common.exceptions.WebDriverException: Message: u"unknown error: Chrome failed to start: crashed\n (Driver info: chromedriver=2.12.301324 (de8ab311bc9374d0ade71f7c167bad61848c7c48),platform=Linux 2.6.32-042stab065.3 x86_64) (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 60.05 seconds\nBuild info: version: '2.43.0', revision: '597b76b', time: '2014-09-09 20:52:14'\nSystem info: host: 'linux-node-firefox', ip: '10.10.3.67', os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-042stab065.3', java.version: '1.6.0_33'\nDriver info: org.openqa.selenium.chrome.ChromeDriver" ; Stacktrace:
And the following error appears on the node's console:
Starting ChromeDriver 2.12.301324 (de8ab311bc9374d0ade71f7c167bad61848c7c48) on port 8719 Only local connections are allowed. [0.011][WARNING]: PAC support disabled because there is no system implementation
BTW, running the same code with DesiredCapabilities.FIREFOX works.
Most probably you don't have the chrome driver on your machine. It can be downloaded from this link: https://code.google.com/p/selenium/wiki/ChromeDriver
Add the following code to set the chrome driver path :
Java:
System.setProperty("webdriver.chrome.driver", "C:/.../chromedriver.exe");
Python:
chromedriver = "C:/.../chromedriver.exe"
os.environ["webdriver.chrome.driver"] = chromedriver
driver = webdriver.Chrome(chromedriver)
Arrange the path according to the location on you machine.
Hope this helps...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With