I’m trying to run a Selenium test with Java and Edge driver (based on Chromium).
The version of my Edge Dev installed on Windows 10
is 83.0.478.37
(Official build dev 64-bit):
Selenium Version : 3.141.59
I’m using webdrivermanager setup for this and used the example provided here.
I tried many options it includes without using webdriver manager but still gives the error.
Without Using Webdriver Manager
System.setProperty("webdriver.edge.driver", System.getProperty("user.dir") + "\drivers\msedgedriver.exe"); EdgeOptions edgeOptions = new EdgeOptions(); chromeOptions = new ChromeOptions(); chromeOptions.addArguments("disable-gpu"); chromeOptions.setBinary("C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"); edgeOptions = edgeOptions.merge(chromeOptions); remDriver = new EdgeDriver(edgeOptions);
AND followed other solutions from here
Am i missing something?
The error stack trace below –
org.openqa.selenium.SessionNotCreatedException: session not created: No matching capabilities found Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'VM-83135Y0-RDS', ip: '10.232.38.151', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144' Driver info: driver.version: EdgeDriver remote stacktrace: Backtrace: Ordinal0 [0x00007FF7AE6E1BD2+3414994] Ordinal0 [0x00007FF7AE5B75B2+2192818] Ordinal0 [0x00007FF7AE45477F+739199] Ordinal0 [0x00007FF7AE3DF5BF+259519] Ordinal0 [0x00007FF7AE3DEEB4+257716] Ordinal0 [0x00007FF7AE3E0601+263681] Ordinal0 [0x00007FF7AE3DD68F+251535] Ordinal0 [0x00007FF7AE3BA663+108131] Ordinal0 [0x00007FF7AE3BB9CE+113102] Ordinal0 [0x00007FF7AE5D24F1+2303217] GetHandleVerifier [0x00007FF7AE85E564+1425828] GetHandleVerifier [0x00007FF7AE85E32A+1425258] GetHandleVerifier [0x00007FF7AE8762E1+1523489] GetHandleVerifier [0x00007FF7AE85EB7B+1427387] Ordinal0 [0x00007FF7AE5C8797+2262935] Ordinal0 [0x00007FF7AE5D3ECA+2309834] Ordinal0 [0x00007FF7AE5F20C8+2433224] BaseThreadInitThunk [0x00007FFE43164034+20] RtlUserThreadStart [0x00007FFE453A3691+33] 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.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(ReferencePipeline.java:193) at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464) 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.edge.EdgeDriver.<init>(EdgeDriver.java:141) at org.openqa.selenium.edge.EdgeDriver.<init>(EdgeDriver.java:130)
Advertisement
Answer
Fixed it with little tweaks, and used the WebdriverManager.
Observed an issue with WebdriverManager, it is downloading a different version of edgedriver
and eventually it is failing because of the driver/browser incompatibility.
Check the browser version against the available driver version. If both are different, set the edge driver version like below.
In my scenario –
Edge Browser Version is 84.0.522.49
but its downloading 84.0.524.0
WebDriverManager manager = WebDriverManager.edgedriver(); manager.config().setEdgeDriverVersion("84.0.522.49"); manager.setup(); EdgeOptions options = new EdgeOptions(); driver = new EdgeDriver(options);