Open jbakeri4 opened 1 year ago
Hi @jbakeri4. Have you completed the required configuration at https://www.selenium.dev/documentation/ie_driver_server/#required-configuration ?
Since you're on Windows 11, the protected mode settings aren't available through the Internet Settings control panel anymore so you will need to edit these setting in the registry manually. Here's a link to a guide that explains how to do that: https://github.com/MicrosoftEdge/EdgeWebDriver/issues/38#issuecomment-1247181616
Make sure you've changed all the necessary configurations and then try again.
Thanks for the reply, @bwalderman, I appreciate your help.
Per the Required Configuration section of the IE Driver Server from Selenium documentation:
System.setProperty("webdriver.ie.driver", "C:\\IEDriverServer.exe");
. Will/does this not work? I cannot find any documentation that explicitly details how to add the IEDriverServer executable into Windows' PATH; I have placed the executable on the root of my C:\ drive- should I just add C:\
to PATH?FEATURE_BFCACHE
key under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl
and then created a 32-bit DWORD value named iexplore.exe
with a value of 0
inside of it.Per the answer on the SuperUser question linked to on Issue 38:
2500
for each of the keys under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\
with the value of 3
to disable Protected Mode in Internet Explorer.After rebooting my machine and re-running the Java method in my original post [with the addition of the command in my first bullet point], now not only can I still not interact with elements inside a page opened in Edge - Internet Explorer mode but the browser no longer navigates to the specified URL. I'm presented with a new error in the console [shown below] as well as a banner at the bottom of the browser stating the Protected Mode is disabled, which I'd like to take as a good thing because it would appear the newly added DWORDs are at least being observed but I'm still unable to succeed in my original attempt.
Could you confirm that performing the above steps resulted in you being able to interact with a page opened in Internet Explorer mode under Edge? I'm wondering if maybe it's just the PATH variable that I'm setting wrong or if there's another thing I'm missing.
Thank you again for your help, I truly appreciate it!
[RemoteTestNG] detected TestNG version 7.8.0
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Started InternetExplorerDriver server (32-bit)
4.10.0.0
Listening on port 48359
Only local connections are allowed
FAILED: sandbox.EdgeInternetExplorer.testEdgeIEMode
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'TCG751SQ3', ip: '192.168.1.38'
Build info: version: '4.9.1', revision: 'eb2032df7f'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.7'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: internet explorer, se:ieOptions: {}}]}]
Capabilities {}
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:561)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:229)
at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:169)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:156)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:116)
at sandbox.EdgeInternetExplorer.testEdgeIEMode(EdgeInternetExplorer.java:24)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:664)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:227)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:957)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:200)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:148)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:848)
at org.testng.TestRunner.run(TestRunner.java:621)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:443)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:437)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:397)
at org.testng.SuiteRunner.run(SuiteRunner.java:336)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1280)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1200)
at org.testng.TestNG.runSuites(TestNG.java:1114)
at org.testng.TestNG.run(TestNG.java:1082)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.lang.RuntimeException: NettyHttpHandler request execution error
at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:76)
at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)
at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:56)
at org.openqa.selenium.remote.http.netty.NettyHttpHandler.execute(NettyHttpHandler.java:49)
at org.openqa.selenium.remote.http.AddSeleniumUserAgent.lambda$apply$0(AddSeleniumUserAgent.java:42)
at org.openqa.selenium.remote.http.Filter.lambda$andFinally$1(Filter.java:56)
at org.openqa.selenium.remote.http.netty.NettyClient.execute(NettyClient.java:99)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:112)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:94)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:68)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:165)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:183)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
... 33 more
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException: Request timeout to localhost/127.0.0.1:48359 after 180000 ms
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
at org.asynchttpclient.netty.NettyResponseFuture.get(NettyResponseFuture.java:206)
at org.openqa.selenium.remote.http.netty.NettyHttpHandler.makeCall(NettyHttpHandler.java:59)
... 46 more
Caused by: java.util.concurrent.TimeoutException: Request timeout to localhost/127.0.0.1:48359 after 180000 ms
at org.asynchttpclient.netty.timeout.TimeoutTimerTask.expire(TimeoutTimerTask.java:43)
at org.asynchttpclient.netty.timeout.RequestTimeoutTimerTask.run(RequestTimeoutTimerTask.java:50)
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715)
at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34)
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703)
at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790)
at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
===============================================
Default test
Tests run: 1, Failures: 1, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 1, Passes: 0, Failures: 1, Skips: 0
===============================================
Hello,
I am facing a serious problem whilst trying to run a very simple test using Internet Explorer Mode under Microsoft Edge [Chromium]. I am able to launch Internet Explorer attached to Edge and navigate to a URL, but the test times out trying to obtain/interact with Web page elements. In other words, after the
driver.get
command nothing else is executed.I know Internet Explorer is no longer supported by Microsoft but my company are contractually obligated to support its invocation through Edge for the time being.
This is my development environment configuration:
pom.xml
dependencies]This is my Java method:
This is the console output:
I would greatly appreciate any and all help as I've not been able to find matching discussion on this problem in old GitHub Issues; on StackOverflow; on reddit; on Quora; etc.. Thank you!