【发布时间】:2017-09-20 10:22:52
【问题描述】:
如何使用 selenium webdriver 3.4.0 启动 IE 浏览器?我试过了,但无法打开IE浏览器。我已经下载了 IE 驱动程序并遵循了启动 firefox 驱动程序的方法。
火狐浏览器启动正常,下面是命令行
System.setProperty("webdriver.gecko.driver","C:\\Users\\vidhya.r\\Desktop\\Automation\\Jars\\geckodriver.exe");
FirefoxOptions options = new FirefoxOptions();
options.setBinary("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
driver = new FirefoxDriver(options);
【问题讨论】:
-
System.setProperty("webdriver.ie.driver", "IE驱动路径"); WebDriver driver = new InternetExplorerDriver();使用这个