标签:logs files class 启动 file 这一 new exception man
启动谷歌浏览器
@Before public void setUp() throws Exception { System.setProperty("webdriver.chrome.driver","D:\\Configuration\\chromedriver.exe");//这一步必不可少 driver = new ChromeDriver(); driver.manage().window().maximize(); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); }
启动火狐浏览器
@Before public void setUp() throws Exception { System.setProperty("webdriver.firefox.driver", "D:\\Configuration\\geckodriver.exe"); System.setProperty("webdriver.firefox.bin", "C:\\Program Files\\Mozilla Firefox\\firefox.exe"); WebDriver = new FirefoxDriver(); WebDriver.manage().window().maximize(); WebDriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); }
selenium3.4.0-java,启动谷歌浏览器和火狐浏览器
标签:logs files class 启动 file 这一 new exception man
原文地址:http://www.cnblogs.com/yanzhe/p/7550855.html