I am using python with selenium webdriver to run and automate test cases on a grid. I am able start the FIREFOX browser with some warning messages on both hub and node, but it works fine. But the issue is starting the same web application using CHROME. I tried everything possible, but no help. Whenever I have to start off with the CHROME browser locally, I used to run the chromedriver.exe
to start the app. but I don't know how to parse the chromedriver.exe
remotely to start the same app there. I have even tried installing and started running the chromedriver on the node and checked f it starts running but it was of no help.And have set the system property as well...
java -jar ./selenium-server-standalone-2.35.0.jar - Dwebdriver.chrome.driver='/opt/drivers/chromedriver' -role webdriver -hub http://192.168.1.10:4444/grid/register -port 5566 -browser browserName=chrome
output:
======================================================================
ERROR: test_search_in_python_org (__main__.PythonOrgSearch)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python27\bharath.py", line 13, in setUp
self.driver = webdriver.Remote('http://192.168.1.62:4444/wd/hub',DesiredCapabilities.CHROME)
File "C:\Python27\lib\site-packages\selenium-2.47.1-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 87, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Python27\lib\site-packages\selenium-2.47.1-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 136, in start_session
'desiredCapabilities': desired_capabilities,
File "C:\Python27\lib\site-packages\selenium-2.47.1-py2.7.egg\selenium\webdriver\remote\webdriver.py", line 196, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium-2.47.1-py2.7.egg\selenium\webdriver\remote\errorhandler.py", line 181, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: The driver executable does not exist: C:\Users\user\'C:\Users\user\Desktop\chromedriver.exe'
Stacktrace:
at com.google.common.base.Preconditions.checkState (Preconditions.java:197)
at org.openqa.selenium.remote.service.DriverService.checkExecutable (DriverService.java:121)
at org.openqa.selenium.remote.service.DriverService.findExecutable (DriverService.java:116)
at org.openqa.selenium.chrome.ChromeDriverService.access$0 (ChromeDriverService.java:1)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable (ChromeDriverService.java:137)
at org.openqa.selenium.remote.service.DriverService$Builder.build (DriverService.java:290)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService (ChromeDriverService.java:88)
at org.openqa.selenium.chrome.ChromeDriver.<init> (ChromeDriver.java:138)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance (Constructor.java:526)
at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor (DefaultDriverProvider.java:103)
at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance (DefaultDriverProvider.java:97)
at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance (DefaultDriverFactory.java:60)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call (DefaultSession.java:222)
at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call (DefaultSession.java:1)
at java.util.concurrent.FutureTask.run (FutureTask.java:262)
at org.openqa.selenium.remote.server.DefaultSession$1.run (DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615)
at java.lang.Thread.run (Thread.java:745)
----------------------------------------------------------------------
Ran 1 test in 1.310s
FAILED (errors=1)
Please help me out here...
The issue seems that you're try to open the file pointing in the wrong location:
WebDriverException: Message: The driver executable does not exist: C:\\Users\\user\\'C:\\Users\\user\\Desktop\\chromedriver.exe' Stacktrace:
btw isn't clear why you're trying to start chromedriver with java if you're using python..
If you're using python you can check this: test suite python - webdriver
Best Regards Claudio
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.