【发布时间】:2020-07-17 13:11:30
【问题描述】:
当我尝试从 selenium 代码启动 IE 时出现此错误。
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 800700C1 ('%1 is not a valid Win32 application.') for URL 'http://localhost:4593/'
代码
public class Simple {
public static void main(String[] args) throws IOException {
System.setProperty("webdriver.ie.driver", "./UpdateSyncRate/Library/drivers/IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver();
driver.manage().deleteAllCookies();
driver.get(URL);
driver.manage().window().maximize();
}
}
【问题讨论】:
标签: selenium