webdriver启动firefox加载自定义配置文件问题
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...");
}
}
1.ProfilesIni pi = new ProfilesIni();
2.WebDriver driver = new FirefoxDriver(profile); fhhh_eyou 发表于 2017-11-9 13:56
1.ProfilesIni pi = new ProfilesIni();
2.WebDriver driver = new FirefoxDriver(profile);
请问下什么意思呢? 有大神给解释下的吗? 定义错误! fhhh_eyou 发表于 2017-11-13 19:43
定义错误!
刚学,请教下应该怎么写呢?
页:
[1]