我有一些使用Java-Selenium可以在Chrome/Firefox/IE9上正常工作的自動化測試。我有Selenium 2.47並使用適當的驅動程序。最近我已升級到IE 11,從那時起我的測試失敗,除了以下例外:我的硒代碼不適用於IE 11
*org.openqa.selenium.NoSuchWindowException: Unable to find elements on closed window (WARNING: The server did not provide any stacktrace information)*
Command duration or timeout: 31 milliseconds
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: os.name: 'Windows 7', os.arch: 'amd64', 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:13059/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}]
*** Element info: {Using=name, value=username}
有人可以指導我呢?
它在登錄頁面本身失敗。
需要更多信息bro。 –
這是引發此異常的行:webElements = wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(byType)); – amit