2017-08-25 69 views

回答

0

下载chromedriver: -

https://chromedriver.storage.googleapis.com/index.html?path=2.31/

的完整代码就会像下面: -

System.setProperty("webdriver.chrome.driver","D:\\Workspace\\JmeterWebdriverProject\\src\\lib\\chromedriver.exe"); 
ChromeOptions chromeOptions = new ChromeOptions(); 
chromeOptions.addArguments("--start-maximized"); 
WebDriver driver = new ChromeDriver(chromeOptions); 
driver.get("https://www.google.co.in/"); 

编辑壁虎司机按你geckodriver的位置的路径

+0

向我解释如何做到这一点请 – IndigoTypeFour

+0

我已经更新了我的答案..你需要从上面的URL下载chromedriver ..现在你需要通过在第一行代码chromedriver的位置... –

+0

作为解释.. 。chrome需要一个帮助chrome使用脚本来自动化的驱动程序..这些脚本向chromedriver发送指令,然后chromedriver指示chrome执行操作..这发生在它们之间的api调用之间 –

相关问题