标签:print web ref imp set sso timeout org tools
package ceshi.com.lessons;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class LuanchFirefox {
public static void main(String[] args) {
System.setProperty ( "webdriver.firefox.bin" , "D:/Program Files (x86)/Mozilla Firefox/firefox.exe" );
System.setProperty("webdriver.gecko.driver", ".\\Tools\\geckodriver.exe");
WebDriver dr=new FirefoxDriver();
dr.manage().window().maximize();
dr.manage().timeouts().implicitlyWait(8, TimeUnit.SECONDS);
dr.get("http://www.baidu.com");
System.out.println("当前打开页面的标题是:" + dr.getTitle());
dr.quit();
}
}
java+selenium3学习之一启动firefox浏览器
标签:print web ref imp set sso timeout org tools
原文地址:http://www.cnblogs.com/51testing/p/7306582.html