Make sure that Firefox installed in your machine and all necessary jars for selenium
1. Launch Firefox
2. Open google site
Script :
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
} |