小编siv*_*iva的帖子

Selenium:org.openqa.selenium.NoSuchWindowException:当前关注窗口已关闭

  1. System.setProperty("webdriver.ie.driver","D:\ Selenium\jars\IEDriverServer\IEDriverServer.exe");
  2. WebDriver driver = new InternetExplorerDriver();
  3. driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
  4. driver.get(" http://the-internet.herokuapp.com ");
  5. driver.findElement(By.linkText("Forgot Password")).click();
  6. 了Thread.sleep(3000);
  7. driver.findElement(By.id( "电子邮件"))的SendKeys( "testmail@mail.com").

当我运行上面的代码它与chrome和firefox工作正常,但当我运行使用IE时,它运行第7步时抛出以下错误不明白它不在IE中工作.

有人可以帮我解决这个问题.提前致谢

2017年11月20日下午2:58:39 org.openqa.selenium.remote.ErrorCodes toStatus INFO:HTTP状态:'404' - >'没有这样的窗口'的错误JSON状态映射(预期400)

org.openqa.selenium.NoSuchWindowException:当前关注的窗口已关闭. 构建信息:版本:'3.6.0',修订版:'6fbf3ec767',时间:'2017-09-27T15:28:36.4Z'系统信息:主机:'ML-SIVAKUMARS-P',ip:'192.168.12.159 ',os.name:'Windows 7',os.arch:'amd64',os.version:'6.1',java.version:'1.8.0_121'驱动程序信息:org.openqa.selenium.ie.InternetExplorerDriver功能[ {proxy = Proxy(),acceptInsecureCerts = false,browserVersion = 11,se:ieOptions = {nativeEvents = true,browserAttachTimeout = 0,ie.ensureCleanSession = false,elementScrollBehavior = 0,enablePersistentHover = true,ie.browserCommandLineSwitches =,ie.forceCreateProcessApi = false,requireWindowFocus = false,initialBrowserUrl = http:// localhost:2761 /,ignoreZoomSetting = false,ie.fileUploadDialogTimeout = 3000,ignoreProtectedModeSettings = false},timeouts = {implicit = 0,pageLoad = 300000,script = 30000},browserName = internet explorer,pageLoadStrategy = normal,javascriptEnabled = …

selenium

7
推荐指数
2
解决办法
2万
查看次数

标签 统计

selenium ×1