<bdo id='f7XSE'></bdo><ul id='f7XSE'></ul>
      <legend id='f7XSE'><style id='f7XSE'><dir id='f7XSE'><q id='f7XSE'></q></dir></style></legend>

        <tfoot id='f7XSE'></tfoot>

        <small id='f7XSE'></small><noframes id='f7XSE'>

        <i id='f7XSE'><tr id='f7XSE'><dt id='f7XSE'><q id='f7XSE'><span id='f7XSE'><b id='f7XSE'><form id='f7XSE'><ins id='f7XSE'></ins><ul id='f7XSE'></ul><sub id='f7XSE'></sub></form><legend id='f7XSE'></legend><bdo id='f7XSE'><pre id='f7XSE'><center id='f7XSE'></center></pre></bdo></b><th id='f7XSE'></th></span></q></dt></tr></i><div id='f7XSE'><tfoot id='f7XSE'></tfoot><dl id='f7XSE'><fieldset id='f7XSE'></fieldset></dl></div>
      1. 无法在带有 Selenium 的 IE 11 上的关闭窗口上找到元

        时间:2023-10-01
        <tfoot id='jSTt8'></tfoot>

          <tbody id='jSTt8'></tbody>

            <legend id='jSTt8'><style id='jSTt8'><dir id='jSTt8'><q id='jSTt8'></q></dir></style></legend>
              1. <small id='jSTt8'></small><noframes id='jSTt8'>

                  <bdo id='jSTt8'></bdo><ul id='jSTt8'></ul>

                • <i id='jSTt8'><tr id='jSTt8'><dt id='jSTt8'><q id='jSTt8'><span id='jSTt8'><b id='jSTt8'><form id='jSTt8'><ins id='jSTt8'></ins><ul id='jSTt8'></ul><sub id='jSTt8'></sub></form><legend id='jSTt8'></legend><bdo id='jSTt8'><pre id='jSTt8'><center id='jSTt8'></center></pre></bdo></b><th id='jSTt8'></th></span></q></dt></tr></i><div id='jSTt8'><tfoot id='jSTt8'></tfoot><dl id='jSTt8'><fieldset id='jSTt8'></fieldset></dl></div>
                • 本文介绍了无法在带有 Selenium 的 IE 11 上的关闭窗口上找到元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试在使用 Selenium WebDriver 的 Internet Explorer 11 上运行测试.代码是:

                  System.setProperty("webdriver.ie.driver", "Path/to//IEDriverServer.exe");WebDriver driver = new InternetExplorerDriver();driver.get("www.google.com");driver.findElement(By.name("q"));

                  我得到这个错误:

                  <块引用>

                  已启动 InternetExplorerDriver 服务器(64 位)2.46.0.0 监听端口 43760 线程主"org.openqa.selenium.NoSuchWindowException 中的异常:无法找到元素关闭窗口(警告:服务器未提供任何堆栈跟踪信息)命令持续时间或超时:15毫秒构建信息:版本:2.46.0",修订:'61506a4624b13675f24581e453592342b7485d71',时间:'2015-06-0410:22:50' 系统信息:主机:'user1-PC',ip:'10.0.23.71',os.name:'Windows 7',os.arch:'amd64',os.version:'6.1',java.version:'1.8.0_45' 驱动程序信息:org.openqa.selenium.ie.InternetExplorerDriver功能 [{browserAttachTimeout=0, enablePersistentHover=true,ie.forceCreateProcessApi=false,pageLoadStrategy=normal,ie.usePerProcessProxy=false,ignoreZoomSetting=false,handleAlerts=true,版本=11,平台=WINDOWS,nativeEvents=true,ie.ensureCleanSession=false,elementScrollBehavior=0,ie.browserCommandLineSwitches=, requireWindowFocus=false,browserName=互联网浏览器,initialBrowserUrl=

                  I'm trying to run tests on Internet Explorer 11 working with Selenium WebDriver. The code is:

                  System.setProperty("webdriver.ie.driver", "Path/to//IEDriverServer.exe");
                          WebDriver driver = new InternetExplorerDriver();
                  driver.get("www.google.com");
                  driver.findElement(By.name("q"));
                  

                  And I get this error:

                  Started InternetExplorerDriver server (64-bit) 2.46.0.0 Listening on port 43760 Exception in thread "main" org.openqa.selenium.NoSuchWindowException: Unable to find element on closed window (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 15 milliseconds Build info: version: '2.46.0', revision: '61506a4624b13675f24581e453592342b7485d71', time: '2015-06-04 10:22:50' System info: host: 'user1-PC', ip: '10.0.23.71', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_45' Driver info: org.openqa.selenium.ie.InternetExplorerDriver Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, pageLoadStrategy=normal, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:43760/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}] Session ID: 8a5b7ab5-862a-462d-ab4b-929d4ed5b71a *** Element info: {Using=name, value=q} at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:358) at org.openqa.selenium.remote.RemoteWebDriver.findElementByName(RemoteWebDriver.java:431) at org.openqa.selenium.By$ByName.findElement(By.java:300) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:350) at MySel20Proj.MySel20Proj.App.main(App.java:42)

                  I tried to follow the configure tutorial on https://code.google.com/p/selenium/wiki/InternetExplorerDriver but is still not working. And this code works on Firefox and Chrome.

                  解决方案

                  Try going to Internet Options --> Security --> "Enable Protected Mode" on ALL zones should either be checked or ALL unchecked.

                  这篇关于无法在带有 Selenium 的 IE 11 上的关闭窗口上找到元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何将 util java 类重用到其他空手道项目中? 下一篇:与 PhantomJS 等效的 Java 是什么?

                  相关文章

                  最新文章

                  <tfoot id='bZApb'></tfoot><legend id='bZApb'><style id='bZApb'><dir id='bZApb'><q id='bZApb'></q></dir></style></legend>

                    <bdo id='bZApb'></bdo><ul id='bZApb'></ul>
                • <small id='bZApb'></small><noframes id='bZApb'>

                  <i id='bZApb'><tr id='bZApb'><dt id='bZApb'><q id='bZApb'><span id='bZApb'><b id='bZApb'><form id='bZApb'><ins id='bZApb'></ins><ul id='bZApb'></ul><sub id='bZApb'></sub></form><legend id='bZApb'></legend><bdo id='bZApb'><pre id='bZApb'><center id='bZApb'></center></pre></bdo></b><th id='bZApb'></th></span></q></dt></tr></i><div id='bZApb'><tfoot id='bZApb'></tfoot><dl id='bZApb'><fieldset id='bZApb'></fieldset></dl></div>