Monday, February 15, 2016

Launch FireFox


Make sure that Firefox installed in your machine and all necessary jars for selenium

1. Launch Firefox
2. Open google site

Script :
public class LaunchFF {
public static void main(String[] args) throws InterruptedException {
// TODO Auto-generated method stub
WebDriver myTestDriver=new FirefoxDriver();
myTestDriver.get("http://www.google.com");
Thread.sleep(7000);
// maximise the window
myTestDriver.manage().window().maximize();
Thread.sleep(5000);
// to close the browser.
myTestDriver.close();
}
}
view raw LaunchFF.java hosted with ❤ by GitHub