Grid : Is chromedriver binary file not required when running the test in same machine

199 views
Skip to first unread message

Vignesh Ramesh

unread,
Jul 12, 2015, 2:32:02 PM7/12/15
to seleniu...@googlegroups.com
I am using selenium grid to run test in chrome browser . when i am using my PC as both selenium hub and node. My selenium script is running successfully without setting the path for chrome binary file.

sample code
           
 DesiredCapabilities capabilities = DesiredCapabilities.chrome();
 
 capabilities
.setBrowserName("chrome");
 
 capabilities
.setPlatform(Platform.LINUX);
 
 driver
= new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capabilities);

 driver
.get("http://www.google.co.in");


But when i create a webdriver instance  instead of RemoteWebDriver

                  
   WebDriver driver = new ChromeDriver();
     
   driver
.get("http://www.google.com");


I get an error message The path to the driver executable must be set by the webdriver.chrome.driver system property;

Can anyone explain me why the test is working fine without an binary file in the first case

Any help is greatly appreciated

Shawn Knight

unread,
Jul 12, 2015, 9:42:56 PM7/12/15
to seleniu...@googlegroups.com

Krishnan Mahadevan

unread,
Jul 12, 2015, 11:25:10 PM7/12/15
to Selenium Users
I dont think that's the case. You will see the error message that you have called out in the second case under the following conditions :


* The chromedriver binary cannot be found in all the folders as detailed by the PATH environment variable.
* Webdriver tried querying the JVM argument webdriver.chrome.driver and found an empty value.

This behavior is the same across both RemoteWebDriver and ChromeDriver because RemoteWebDriver internally doesn't do much apart from using reflection to make a call to ChromeDriver only to get the job done.




Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/07076420-2f0d-479a-bfc9-cf8fd9287fbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages