Getting Error- DevToolsActivePort file doesn't exist while automating electron app using selenium webdriver #8620
Description
ð Bug Report
Getting below mentioned error
org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'LAPTOP-1UNI7991', ip: '192.168.0.139', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_231'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
Ordinal0 [0x005C87E3+2852835]
Ordinal0 [0x004B5BB1+1727409]
Ordinal0 [0x0038E4B9+517305]
Ordinal0 [0x00320215+66069]
Ordinal0 [0x0031D31C+54044]
Ordinal0 [0x0033D9F7+186871]
Ordinal0 [0x0033D7FD+186365]
Ordinal0 [0x0033B70B+177931]
Ordinal0 [0x00322584+75140]
Ordinal0 [0x00323650+79440]
Ordinal0 [0x003235E9+79337]
Ordinal0 [0x004CAD5C+1813852]
GetHandleVerifier [0x006EC616+1075574]
GetHandleVerifier [0x006EC367+1074887]
GetHandleVerifier [0x006F7497+1120247]
GetHandleVerifier [0x006ECC16+1077110]
Ordinal0 [0x004C3206+1782278]
Ordinal0 [0x004CC3BB+1819579]
Ordinal0 [0x004CC523+1819939]
Ordinal0 [0x004E2B45+1911621]
BaseThreadInitThunk [0x75A76359+25]
RtlGetAppContainerNamedObjectPath [0x77747C24+228]
RtlGetAppContainerNamedObjectPath [0x77747BF4+180]
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.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:147)
at BasicCommands.ElectronAppTest.setup(ElectronAppTest.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:521)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:140)
at org.testng.TestRunner.beforeRun(TestRunner.java:645)
at org.testng.TestRunner.run(TestRunner.java:613)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
at org.testng.SuiteRunner.run(SuiteRunner.java:259)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1200)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1125)
at org.testng.TestNG.run(TestNG.java:1033)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
To Reproduce
Detailed steps to reproduce the behavior:
- Refer https://applitools.com/blog/automating-electron-applications-using-selenium/
- Download the electron app from the link- https://github.com/electron/electron-api-demos/releases
- Download the chrome driver exe for Chrome v84.0.4147.105 .
- Add the path of electron app .exe in the selenium program which is attached to this issue.
- Add the path of the chrome driver exe in the selenium program which is attached to this issue.
- Run the selenium program.
Expected behavior
The action mentioned in the selenium java program should be executed without any issue.
Test script or set of commands reproducing this issue
Refer below attachment
Attachment.zip
Environment
OS: Windows 10 Home 64 bit
Browser: Chrome
Browser version: 84.0.4147.105 (Official Build) (64-bit
Browser Driver version: ChromeDriver v 84.0.4147.30
Language Bindings version: Java 1.8.0.231
Selenium Grid version (if applicable): None.