Selenium grid 2 in chrome browser

0 votes

I'm using selenium-2.42.2 in Windows 7, I started a hub and typed "java -jar selenium-server-standalone.jar -role node -nodeConfig nodeconfig.json -Dwebdriver.chrome.driver= D:\selenium\chromedriver.exe" in terminal, following is junit 4 test case :

    public void setUp() throws Exception {

    driver = new ChromeDriver();

    baseUrl = "http://127.0.0.1:8443/";

    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

  }

  @Test

  public void testWebdriver() throws Exception {

    driver.get(baseUrl + "/customizedfolder/main.html");

    for (int second = 0;; second++) {

        if (second >= 60) fail("timeout");

        try { if (isElementPresent(By.xpath("//div[@id='f21TemFolder']/div/span"))) break; } catch (Exception e) {}

        Thread.sleep(1000);

    }

    driver.findElement(By.xpath("//div[@id='f21TemFolder']/div/span")).click();    

  }

Below nodeconfig.jso code :

{

 "capabilities": [ 

{ "browserName": "*firefox", "seleniumProtocol":"Selenium","platform": "LINUX", "maxInstances": 3 },

{"browserName": "*chrome", "seleniumProtocol":"WebDriver","platform": "LINUX", "maxInstances": 3 } 

], 

"configuration": { "nodeTimeout":120, "port":5555, "hubPort":4444, "hubHost":"localhost", "nodePolling":2000, "registerCycle":10000, "register":true, "cleanUpCycle":2000, "timeout":30000, "maxSession":1, }

 }

but there is problem in opening chrome browser.

The error is: the path to the driver executable must be set by the webdriver.chrome.driver system property....

I also set webdriver.chrome.driver in system property, but failed too.

Chrome version is : 36.0.1985.143 m, chrome driver version is :2.10 how to use chrome in selenium grid 2?

Apr 27, 2018 in Selenium by Martin
• 4,320 points
1,256 views

1 answer to this question.

0 votes

The problem is in -Dwebdriver arguments.

Maybe you should do something like this -Dwebdriver.chrome.driver ...

java -jar selenium-server-standalone.jar -role node -nodeConfig nodeconfig.json  -Dwebdriver.chrome.driver=D:\selenium\chromedriver.exe

answered Apr 27, 2018 by Samarpit
• 5,910 points

Related Questions In Selenium

0 votes
1 answer

Test in parallel with selenium grid 2

You have to register one more node ...READ MORE

answered Apr 27, 2018 in Selenium by anonymous
754 views
0 votes
1 answer

Run chrome browser in inconginto Mode in Selenium

One other way to launch Chrome in ...READ MORE

answered Jul 31, 2018 in Selenium by Meci Matt
• 9,460 points
33,826 views
0 votes
8 answers

How to open a link in new tab of chrome browser using Selenium WebDriver?

This below code works for me in ...READ MORE

answered Dec 14, 2020 in Selenium by Gitika
• 65,770 points
102,997 views
+1 vote
1 answer

How to maximize chrome browser in Selenium Java?

You can use Chrome options for playing ...READ MORE

answered Dec 17, 2018 in Selenium by Nabarupa
5,276 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,649 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,131 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,209 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,865 views
0 votes
1 answer

Maximizing the browser window in Selenium WebDriver using C#

Check this first: http://code.google.com/p/selenium/issues/detail?id=174 You Can use the JavascriptExector as follows: public ...READ MORE

answered May 2, 2018 in Selenium by Samarpit
• 5,910 points
1,155 views
+1 vote
1 answer

How to handle notifications in Python with Selenium (Chrome WebDriver)

Below will help you: You can disable the ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
14,416 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP