TA的每日心情 | 开心 2016-12-6 11:18 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
1测试积点
package testng;
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 StartFirefox{
public static void StartLocalFirefox(){
System.out.println("start firefox browser...");
System.setProperty("webdriver.firefox.bin",
"D:/Program Files/Mozilla Firefox/firefox.exe");
ProfilesIni pi = new ProfilesIni();
FirefoxProfile profile = pi.getProfile("default");
WebDriver driver = new FirefoxDriver(profile); //The constructor FirefoxDriver(FirefoxProfile) is undefined
driver.get("http://www.baidu.com/");
System.out.println("start firefox browser succeed...");
}
}
|
|