Selenium Grid 2-Parallel Execution

Selenium Grid allows to access to run the test cases with different  machine with multiple browser. It works as a parallel  execution. Selenium grid is automated testing execution on Distributed systems in parallel.

Architecture of Selenium Grid:

Selenium grid consists one hub which control all the nodes which is registered on hub.Node is working as a port and each node is capable to open multiple browser.Every single machine working as a hub and a hub can have multiple nodes.


Installation of Selenium Grid:

For installing the selenium grid we have to install selenium server jar file. Now we will start the hub configuration in your local machine, For making the hub we open the terminal type the command.

  • java -jar selenium-server-standalone-2.45.0.jar -role hub

Now we open the browser and type http://localhost:4444 we will get the selenium grid screen.


Now we take next step we will make nodes. By default a single node will work as a operating system same as host and will five firefox, chrome Instance  and one Internet Explorer. Now we open the terminal and follow the command.



Code for Selenium Grid:

package datatest;


import org.openqa.selenium.By;
import org.openqa.selenium.Platform;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;

public class SearchTest {

public void Testfind(String b) throws MalformedURLException{

DesiredCapabilities cap = null;

cap = DesiredCapabilities.firefox();
}else if (b.equals("chrome")){
cap =;
}else if (b.equals("iexplore")){
cap = DesiredCapabilities.internetExplorer();

RemoteWebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"),cap);




This entry was posted in Scala. Bookmark the permalink.

One Response to Selenium Grid 2-Parallel Execution

  1. deepika says:

    your information is really well explained and i got more knowledge about your postings , it is really helpful thus it is nice.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s