Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6216677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:17:31+00:00 2026-05-24T07:17:31+00:00

I’m running a test: DesiredCapabilities capability = DesiredCapabilities.Firefox(); IWebDriver driver = new RemoteWebDriver(new Uri(http://localhost:4444/wd/hub),

  • 0

I’m running a test:

DesiredCapabilities capability = DesiredCapabilities.Firefox();
                IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), capability);

                ISelenium selenium = new WebDriverBackedSelenium(driver, "http://localhost/");
                selenium.Start();

This runs the Firefox browser, and in the http://localhost:4444/grid/console web console view I can see that one Firefox browser is running. How can I use more than one browser on the node in parallel?

I’m using the Grid2 wiki page found here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:17:33+00:00Added an answer on May 24, 2026 at 7:17 am

    You need to trigger 5 tests simultaneously – all pointing to the same hub, to use all the browsers. On receiving the commands from different tests, hub would pass those commands to RCs matching the capability. You can see more details in this page : http://selenium-grid.seleniumhq.org/how_it_works.html.

    Per this site:-

    Of course to really take advantage of the Selenium Grid, you need to
    run your tests in parallel. If you are writing your Selenium tests in
    Java, you can leverage TestNG parallel runs or Parallel JUnit. If you
    prefer to write your Selenium tests in Ruby, you might want to look
    into DeepTest or spawn multiple processes. Chances are that your
    favorite programming language and development platform already have a
    solution.

    EDIT:
    The above given site was for Selenium 1.x version and not for Grid 2.0. However, the underlying concept for running parallel tests remains the same

    EDIT2:
    Steps and example programs are below. Please note that this is a very basic test ONLY to show you how Grid runs tests in parallel.

    Step1 – Start Grid Hub
    java -jar selenium-server-standalone.jar -role hub

    Step2 – Start RC nodes. The tests which we are using for example are webdriver tests. So we need to start webdriver nodes. This command would start a webdriver node which supports 5 firefox browsers, 5 googlechrome and 1 IE browser. This is the default config for webdriver.

    java -jar selenium-server-standalone.jar -role wd -hub http://localhost:4444/grid/register
    

    Step 3- Create 5 separate programs similar to the one given below. This program is in JAVA. You need to change it to the language you need. Change class name to Program2,Program3 etc. As mentioned earlier, this is not the best way to run tests in parallel. You need to use testNG or jUnit to trigger multiple tests at the same time. Since that is a different topic by itself am not going to explain it here.

    public class Program1{
            public static void main(String args[]){
    
                WebDriver wd;
                //Assign a remotewebdriver object to webdriver with firefox capability
                wd=new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"),DesiredCapabilities.firefox());
                wd.get("http://www.google.com");
                //Sleep for 2 seconds so that RC will not be released. This is to demonstrate Hub using multiple RCs
                Thread.sleep(120000);
                //Close webdriver
                wd.quit();
    
            }
        }
    

    Step 4 – Run all 5 programs simultaneously.

    Step 5 – Watch the grid doing the magic of running 5 tests in parallel. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.