I was trying to run test concurrently with two browsers firefox and chrome. I had opened three command line windows with following commands 1. java -jar selenium-server-standalone-2.33.0.jar -role
java -jar selenium-server-standalone-2.33.0.jar -role webdriver -hub localhost:4444/grid/register -browser browserName="chrome", version=8.0, platform=WINDOWS -Dwebdriver.chrome.driver=f:\chromedriver.exe
java -jar selenium-server-standalone-2.33.0.jar -role webdriver -hub localhost:4444/grid/register -port 5566
I had following code in GridTest.java file
public static String browser;
public static void setUp() throws MalformedURLException //throws MalformedURLException
{
// if (browser.equalsIgnoreCase("firefox"))
// {
DesiredCapabilities capability1=DesiredCapabilities.firefox();
capability1= DesiredCapabilities.firefox();
capability1.setBrowserName("firefox");
capability1.setPlatform(Platform.WIN8);
driver=new RemoteWebDriver(new URL(nodeURL), capability1);
// }
//
// if (browser.equalsIgnoreCase("chrome"))
// {
capability1=DesiredCapabilities.chrome();
capability1.setBrowserName("chrome");
capability1.setPlatform(Platform.WIN8);
driver=new RemoteWebDriver(new URL(nodeURL), capability1);
// }
}
Do I have to open another command line window if I have to run test in IE? Can test be run concurrently with testng.xml? Please provide the solution