2017-04-18 8 views
0

하위 창에서 확인을 허용/취소하려고합니다. 내 코드는 Chrome에서 제대로 실행되지만 IE 웹 드라이버에서는 실패합니다. TestConfirmationOnNewWindow.java셀렌 : IE 브라우저의 하위 창에서 확인을 처리 할 수 ​​없습니다.

내가 org.openqa.selenium.NoSuchWindowException: Unable to get browser 예외를 얻고있다 -

나는

가 여기에 셀레늄을 실행 내 Java 코드의 버튼 클릭에 확인을 표시하는 자식 창 popup을 시작 HTML 페이지 order이 아래처럼 :

org.openqa.selenium.NoSuchWindowException: Unable to get browser (WARNING: The server did not provide any stacktrace information) 
    Command duration or timeout: 19 milliseconds 
    Build info: version: 'unknown', revision: 'unknown', time: 'unknown' 
    System info: host: 'BMISHRA2D1', ip: '10.192.38.101', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_101' 
    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:36298/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}] 
    Session ID: cb1e7828-1760-4fc6-bcee-7e92156d8ef8 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
     at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) 
     at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) 
     at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) 
     at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:701) 
     at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.alert(RemoteWebDriver.java:1049) 
     at TestConfirmationOnNewWindow.acceptAlert(TestConfirmationOnNewWindow.java:52) 
     at TestConfirmationOnNewWindow.testConfirmAlertOnNewWindow(TestConfirmationOnNewWindow.java:38) 
     at TestConfirmationOnNewWindow.main(TestConfirmationOnNewWindow.java:28) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:498) 
     at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) 

기본값을 확인하기 위해 무시하도록 DesiredCapabilities를 변경해 보았습니다. 무시해도 문제는 발생하지만 여전히 성공하지 못합니다. 코드의 요지 페이지로

링크 - https://gist.github.com/bhabanism/40c6a207c95c66ab6ccd4b765d337ba2

내가 도움이 될 것입니다 잘못 갈 수 있는지에 IE 웹 드라이버 버전 2.53.1.0 (32 비트)

어떤 도움/힌트를 사용하고 있습니다. 감사!

답변

0

IE 웹 드라이버 최신 버전을 사용해 보았는데이 문제는 재현 할 수 없습니다.