0

I am working in selenium RC with Java+Junit+Eclipse. For my project I have developed script which will run in only one browser i.e Firefox through the below code..

public void setUp() throws Exception 
{
   selenium = new DefaultSelenium("localhost", 4444,"*firefox","http://www.google.com");
   FinalTestSuite.selenium.start();
   selenium.windowFocus();
   selenium.windowMaximize();
}

Now I am stuck because requirement came to run the script simultaneously in multiple browsers. I didn't find any helpful article.. Please anyone working on this same scenario...HELP! :)

Vaman Kulkarni
  • 3,411
  • 2
  • 21
  • 22
sss
  • 15
  • 1
  • 6

3 Answers3

0

You can use Selenium Grid to run a script in multiple browsers. Also you can refer this blog regarding its setup configuration.

Hope this helps.

Vaman Kulkarni
  • 3,411
  • 2
  • 21
  • 22
0

Create a runner which will run the suite containing setUp()
Pass the browser name by variable to setup.

You can run the code multiple times with multiple RC server started on different ports.

e.g. My projects runs through ant so i pass -Dargument=*firefox on command prompt then my test cases run on firefox browser also you can pass the port number and host ip.

Thanks

lAH2iV
  • 1,159
  • 2
  • 12
  • 28
0

The best thing to use for parallel execution is TestNG. But since you are using Junit , the following link may help you in that.

http://blog.varunin.com/2011/07/running-selenium-tests-on-different.html

Varun Menon
  • 390
  • 1
  • 6