In my automation framework i use selenium grid to allow multiple execution .
To start the hub/rc follow below steps :
- java -jar selenium-server-standalone-2.24.1 -role hub //to start hub
- java -jar selenium-server-standalone-2.24.1 -role node -hub http://localhost:4444/grid/register // to start rc
c.setJavascriptEnabled(true);
WebDriver driver=null;
try{
driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), c);
}
catch (Exception e) {
// TODO: handle exception
}
Selenium selenium=new WebDriverBackedSelenium(driver,"http://www.google.com");
Now you can use selenium in your project which internally uses webdriver .
No comments:
Post a Comment