[英]IE driver 4.0.0 stuck at This is the initial start page for the WebDriver server
I am using Internet Explorer driver 4.0.0(32bit) and selenium updated version 4.1.2when I run the code using Internet Explorer driver 4.0.0 it is stuck at This is the initial start page for the WebDriver
server.我正在使用 Internet Explorer 驱动程序 4.0.0(32 位)和 selenium 更新版本 4.1.2,当我使用 Internet Explorer 驱动程序 4.0.0 运行代码时,它卡在了这是
WebDriver
服务器的初始起始页。 even though I check the setting in Internet Explorer:即使我检查了 Internet Explorer 中的设置:
but when I change the Internet Explorer driver to 3.1.4 it works fine.但是当我将 Internet Explorer 驱动程序更改为 3.1.4 时,它工作正常。 I also tried the Internet Explorer 4.0.0 for 64 but the same issue I am facing please help me.
我还尝试了 Internet Explorer 4.0.0 for 64,但我面临的同样问题请帮助我。
public class EdgeTest {
static RemoteWebDriver driver = null;
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.ie.driver",
"D:\\Automation\\Jar Details\\Drivers\\IEDriverServer_Win32_4.0.0\\IEDriverServer.exe");
InternetExplorerOptions ieOptions = new InternetExplorerOptions();
ieOptions.attachToEdgeChrome();
ieOptions.withEdgeExecutablePath("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe");
ieOptions.setCapability("ignoreProtectedModeSettings", true);
ieOptions.setCapability("ignoreZoomSettings",true);
System.out.println("this:"+ieOptions.getCapability("ignoreZoomSettings"));
driver = new InternetExplorerDriver(ieOptions);
InternetExplorerDriverService.createDefaultService();
driver.get("https://github.com/");
WebElement elem = driver.findElement(By.name("q"));
elem.sendKeys("gitu");
elem.sendKeys(Keys.ENTER);
driver.quit();
error: "Could not create a new remote session" this is an error getting
错误:“无法创建新的远程会话”这是一个错误
It looks like you are using selenium webdriver to automate Edge IE mode.看起来您正在使用 selenium webdriver 来自动化 Edge IE 模式。 I tried executing your code and I found this code to work fine (using IE driver 4.0.0 and Selenium 4.1.2).
我尝试执行您的代码,发现此代码运行良好(使用 IE 驱动程序 4.0.0 和 Selenium 4.1.2)。
But when executing code again before the code has not been executed complete, you get the same problem you describe (execute code twice at once).但是在代码尚未执行完成之前再次执行代码时,您会遇到您描述的相同问题(一次执行代码两次)。 like this:
像这样:
So I think when the IE driver may be occupied, you can try to open the task manager, end the related task (IE driver 32 bit), and then re-execute the code, I think this should be useful to you.所以我觉得当IE驱动可能被占用的时候,可以尝试打开任务管理器,结束相关任务(IE驱动32位),然后重新执行代码,我想这应该对你有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.