Step 1: Create Java file.
public class allInOne {
}
Step 2 : Enter below code...
public class allInOne {
public static void main(String args[])
{
System.out.println("This is my first project");
}
}
Step 3: Run this file to verify PATH variable is set properly and its working properly..
Step 4 : Result...
Step 5: Add below code for Open Firefox instance...Save File and Run it.....
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.firefox.internal.ProfilesIni;
public class allInOne {
public static void main(String args[])
{
System.out.println("This is my first project");
ProfilesIni pi = new ProfilesIni();
FirefoxProfile fprofile = pi.getProfile("Test Profile");
WebDriver driver = new FirefoxDriver(fprofile);
driver.get("http://google.com");
}
}
Result : It will open Firefox Instance with Google page.....
No comments:
Post a Comment