Why we need to use RemoteWebdriver Not the webdriver in Selenium Grid?

0 votes

Why we need to use RemoteWebdriver Not the webdriver in Selenium Grid?

Jul 4 in Selenium by Ramya
27 views

1 answer to this question.

0 votes

Hi Ramya, we use RemoteWebdriver in Selenium Grid because if we use webdriver (FirefoxDriver / ChromeDriver), it will just assume that the communication to the browser is local. For example: 

Webdriver driver = new FirefoxDriver(); 

Using this, driver will access Firefox browser which is available on the local machine. Now if we will use RemoteWebDriver, it requires us to specify where the Selenium Server is located and on which web browser we want to execute our tests. For example,

WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), DesiredCapabilities.firefox());

Here in above statement , it is specified that Selenium Server is running on localhost with the default port 4444 and execute on firefox browser. In the same fashion, we can run selenium server on one machine as Hub and execute selenium tests on other machine by registering to the node by specifying parameters.

answered Jul 5 by Abha
• 22,870 points

Related Questions In Selenium

0 votes
1 answer

How to use Actions class in Selenium Webdriver?

In seleniun webdriver it is not mandatory ...READ MORE

answered Apr 4, 2018 in Selenium by Damon Salvatore
• 5,510 points
2,436 views
0 votes
1 answer
0 votes
1 answer

How to scroll the Page up or down in Selenium WebDriver? (using java)

Its pretty simple. Check out the below ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,090 points
7,111 views
0 votes
1 answer

How do we use assert() in Selenium WebDriver?

So, for implementing Assert(), you need to ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,090 points
3,677 views
0 votes
1 answer

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,090 points
548 views
0 votes
1 answer
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,130 points
882 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
546 views
0 votes
1 answer