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, 2019 in Selenium by Ramya
2,170 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, 2019 by Abha
• 28,060 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,980 points
3,198 views
0 votes
2 answers

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

JavascriptExecutor jsx = (JavascriptExecutor)driver; jsx.executeScript("window.scrollBy(0,555)", ""); or Action classes ...READ MORE

answered Sep 6, 2020 in Selenium by Sri
• 3,190 points
15,888 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
6,213 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
6,573 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,890 points
4,198 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
5,203 views
+1 vote
1 answer
0 votes
1 answer

How can I add Cucumber Jar files in Eclipse to use with Selenium Webdriver?

Hey Eshan, follow these steps to add ...READ MORE

answered May 23, 2019 in Selenium by Abha
• 28,060 points
3,018 views