Closed nbquestnb closed 3 years ago
Forgot to mention that i'm using Visual Studio to run tests. Here is the capabilities i'm using:
EdgeOptions edgeOptions = new EdgeOptions();
edgeOptions.PageLoadStrategy = PageLoadStrategy.Default;
edgeOptions.PlatformName = "win10";
edgeOptions.AddAdditionalCapability("platform","WIN10");
edgeOptions.AddAdditionalCapability("seleniumProtocol","WebDriver");
edgeOptions.AddAdditionalCapability("maxInstances",1);
edgeOptions.BrowserVersion = "44.17743.1.0";
desiredCapabilities = edgeOptions.ToCapabilities();
driver = new RemoteWebDriver(seleniumServerUri, desiredCapabilities);
Having similar issue when I run my Selenium tests using VSO Environment details Windows version : 1809 OS Build : 17763.1 Edge version : 44.17763.1.0
Initialization settings for test using (var driverService = OpenQA.Selenium.Edge.EdgeDriverService.CreateDefaultService())
using (var instance = new OpenQA.Selenium.Edge.EdgeDriver(driverService))
{
instance.Navigate().GoToUrl("<<Url removed>>");
Exception details OpenQA.Selenium.WebDriverException HResult=0x80131500 Message=A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://localhost:32577/session. The status of the exception was ReceiveFailure, and the message was: The underlying connection was closed: An unexpected error occurred on a receive. Source=WebDriver StackTrace: at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo) at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute) at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service, EdgeOptions options) at OpenQA.Selenium.Edge.EdgeDriver..ctor(EdgeDriverService service) at ReleaseUIAutomatedTest.ReleaseUITests.A1_BasicSubmit() in ... Inner Exception 1: WebException: The underlying connection was closed: An unexpected error occurred on a receive.
Inner Exception 2: IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Inner Exception 3: SocketException: An existing connection was forcibly closed by the remote host
@barancev Hello, I'm sorry that i misled you with my comment but the actual issue is not in the dotnet part of the selenium. The actual error happens when java node tries to run driver executable. I created PR that might fix the issue. https://github.com/SeleniumHQ/selenium/pull/6485
@nbquestnb Please run the node with -debug
option, reproduce the issue and attach the console log here. Session initialization should work without need to set any system properties. We must be sure that the issue actually related to protocol version mismatch before merging this PR.
@barancev Here you go
java "-Dwebdriver.edge.driver=C://Windows/System32/MicrosoftWebDriver.exe" "-Dwebdriver.edge.logfile=C:/selenium/driverlog" "-Dwebdriver.edge.verboseLogging=true" -jar selenium-server-standalone-3.14.0.jar -debug -role node -nodeConfig edge_node_config.json
java "-Dwebdriver.edge.driver=C://Windows/System32/MicrosoftWebDriver.exe" "-Dwebdriver.edge.logfile=C:/selenium/driverlog" "-Dwebdriver.edge.verboseLogging=true" -jar selenium-server-standalone-3.14.0.jar -debug -role node -nodeConfig edge_node_config.json 04:24:28.915 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.14.0', revision: 'aacccce0' 04:24:28.930 INFO [GridLauncherV3$3.launch] - Launching a Selenium Grid node on port 7890 2018-10-06 04:24:29.351:INFO::main: Logging initialized @1123ms to org.seleniumhq.jetty9.util.log.StdErrLog 04:24:29.663 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 7890 04:24:29.663 INFO [GridLauncherV3$3.launch] - Selenium Grid node is up and ready to register to the hub 04:24:29.741 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms. 04:24:29.741 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://192.168.1.42:4444/grid/register 04:24:31.284 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use 04:28:15.719 INFO [ActiveSessionFactory.apply] - Capabilities are: { "browserName": "MicrosoftEdge", "browserVersion": "44.17743.1.0", "maxInstances": 1, "platform": "WIN10", "platformName": "win10", "seleniumProtocol": "WebDriver" } 04:28:15.735 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.edge.EdgeDriverService) 04:28:17.235 INFO [ServicedSession$Factory.apply] - The specified arguments passed to the command are invalid. Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z' System info: host: 'EDGEDRIVER', ip: '192.168.1.36', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_181' Driver info: driver.version: unknown remote stacktrace: org.openqa.selenium.InvalidArgumentException: The specified arguments passed to the command are invalid. Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z' System info: host: 'EDGEDRIVER', ip: '192.168.1.36', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_181' Driver info: driver.version: unknown remote stacktrace: 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$new$0(W3CHandshakeResponse.java:57) at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:122) 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:125) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73) at org.openqa.selenium.remote.server.RemoteSession$Factory.performHandshake(RemoteSession.java:145) at org.openqa.selenium.remote.server.ServicedSession$Factory.apply(ServicedSession.java:160) at org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12(ActiveSessionFactory.java:177) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$11$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$2$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.server.ActiveSessionFactory.apply(ActiveSessionFactory.java:180) at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2(NewSessionPipeline.java:65) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.util.Collections$2.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.server.NewSessionPipeline.lambda$createNewSession$3(NewSessionPipeline.java:68) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.DistinctOps$1$2.accept(Unknown Source) at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Unknown Source) at java.util.stream.Streams$ConcatSpliterator.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.server.NewSessionPipeline.createNewSession(NewSessionPipeline.java:71) at org.openqa.selenium.remote.server.commandhandler.BeginSession.execute(BeginSession.java:65) at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$3(WebDriverServlet.java:250) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 04:28:17.500 INFO [ActiveSessionFactory.apply] - Capabilities are: { "browserName": "MicrosoftEdge", "browserVersion": "44.17743.1.0", "platformName": "win10" } 04:28:17.500 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.edge.EdgeDriverService) 04:28:18.063 INFO [ServicedSession$Factory.apply] - The specified arguments passed to the command are invalid. Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z' System info: host: 'EDGEDRIVER', ip: '192.168.1.36', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_181' Driver info: driver.version: unknown remote stacktrace: org.openqa.selenium.InvalidArgumentException: The specified arguments passed to the command are invalid. Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:13:22.693Z' System info: host: 'EDGEDRIVER', ip: '192.168.1.36', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_181' Driver info: driver.version: unknown remote stacktrace: 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$new$0(W3CHandshakeResponse.java:57) at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:122) 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:125) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73) at org.openqa.selenium.remote.server.RemoteSession$Factory.performHandshake(RemoteSession.java:145) at org.openqa.selenium.remote.server.ServicedSession$Factory.apply(ServicedSession.java:160) at org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12(ActiveSessionFactory.java:177) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$11$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$2$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.server.ActiveSessionFactory.apply(ActiveSessionFactory.java:180) at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2(NewSessionPipeline.java:65) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.util.Collections$2.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.server.NewSessionPipeline.lambda$createNewSession$3(NewSessionPipeline.java:68) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.DistinctOps$1$2.accept(Unknown Source) at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) at java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(Unknown Source) at java.util.stream.Streams$ConcatSpliterator.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.server.NewSessionPipeline.createNewSession(NewSessionPipeline.java:71) at org.openqa.selenium.remote.server.commandhandler.BeginSession.execute(BeginSession.java:65) at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$3(WebDriverServlet.java:250) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
[04:28:17.563] - Starting server...
[04:28:17.563] - Listening on http://127.0.0.1:8262/
[04:28:17.563] - Waiting for new request...
[04:28:18.032] - Received a request: GET http://localhost:8262/status
[04:28:18.032] -
[04:28:18.032] - Response: {"value":{"message":"WebDriver server is ready","ready":true}}
[04:28:18.032] - Waiting for new request...
[04:28:18.047] - Received a request: POST http://localhost:8262/session
[04:28:18.047] - { "desiredCapabilities": { "browserName": "MicrosoftEdge", "platformName": "win10", "browserVersion": "44.17743.1.0" }, "capabilities": { "firstMatch": [ { "browserName": "MicrosoftEdge", "browserVersion": "44.17743.1.0", "platformName": "win10" } ] } }
[04:28:18.063] - Response: {"value":{"error":"invalid argument","message":"The specified arguments passed to the command are invalid.","stacktrace":""}}
[04:28:18.063] - Invalid capabilities
[04:28:18.063] - Waiting for new request...
[04:28:18.063] - Received a request: GET http://localhost:8262/shutdown
[04:28:18.063] -
The following JSON wire protocol command endpoint is not allowed when server is running in W3C mode. GET /shutdown
[04:28:18.063] - Response: Unknown error
@barancev with my fix applied i was able to run the session
@barancev , @nbquestnb
Is there need to fix selenium release, or how can we fix 3.14 ? downgrade to 3.13 or what do you suggest?
@barancev do you have any updates for this topic? Getting exactly the same error
I also started seeing this immediately when I upgraded from Windows build 1803
to 1809
.
Windows 10, Build 1809 Selenium 3.141.5 (Grid) Edge WebDriver Version: 10.0.17763.1 (Default bundled with Windows 1809) Client: WebdriverIO v4.14.1
The following JSON wire protocol command endpoint is not allowed when server is running in W3C mode.
DELETE /session/D031BDFE-D27A-4ACA-A163-D9107B412B70/local_storage
The following JSON wire protocol command endpoint is not allowed when server is running in W3C mode.
GET /session/D031BDFE-D27A-4ACA-A163-D9107B412B70/window/current/size
The following JSON wire protocol command endpoint is not allowed when server is running in W3C mode.
GET /shutdown
[12:30:49] COMMAND DELETE "/wd/hub/session/D031BDFE-D27A-4ACA-A163-D9107B412B70/local_storage"
[12:30:49] DATA {}
Dec 11 2018 12:30:49 - Failed to delete localStorage in MicrosoftEdge: Error: Unknown error
[12:30:49] COMMAND GET "/wd/hub/session/D031BDFE-D27A-4ACA-A163-D9107B412B70/window/current/size"
[12:30:49] DATA {}
Dec 11 2018 12:30:49 - Could not set viewport size: Error: Unknown error
Grid Up And Running (including installation of MicrosoftWebDriver) with:
DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0
java -jar selenium-server-standalone-3.141.5.jar -role node -nodeConfig nodeConfig.json
Please note, that this looks like you are running JWP mode against the W3C version of the endpoints. If you want to continue to run in JWP mode, that is a capability (documented here: https://docs.microsoft.com/en-us/microsoft-edge/webdriver). If there is something else going on here, we'll need to investigate.
Similar to https://github.com/SeleniumHQ/selenium/pull/6485, I forked the repo and within EdgeDriverService.java
I added:
argsBuilder.add("--jwp");
to launch MicrosoftWebdriver in JWP Mode.
This resolved the issue for me.
Is it the webdriverio client bindings that don't yet support the W3C Commands?
@dylanlive That’s almost assuredly the case.
Alrighty - thanks everyone. I think in summary I'm understanding:
@barancev As an actionable item, is it reasonable to support in the desired capabilities to launch Edge Webdriver in a certain mode (w3c/jwp), similar to the Firefox marionette capability?
I see https://github.com/SeleniumHQ/selenium/pull/6485 uses a system environment variable to set this. It would be nice if this could be dynamic so that from the Selenium Grid perspective, if a client is still using json protocol, it can request the jwp mode of MicrosoftWebdriver.
Further detail:
I spoke with the WebdriverIO Community, which informed me Execute by default will send in json wire protocol (/execute
), but if it receives back Unknown Command, will retry with the W3C command (/execute/sync
).
https://github.com/webdriverio-boneyard/v4/blob/767a0cb7796c0635034bfe991fa851ff6f711ff1/lib/protocol/execute.js#L63-L65
Unfortunately, when receiving a JWP command in W3C mode, it appears MicrosoftWebdriver returns back 500 - Unknown Error, instead of 404 - Unknown command. Thus, Webdriverio doesn't seem to retry.
I've opened a bug report for this on the Microsoft side: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/19917561/
cc @thejohnjansen
@dylanlive
Similar to #6485, I forked the repo and within
EdgeDriverService.java
I added:argsBuilder.add("--jwp");
to launch MicrosoftWebdriver in JWP Mode.
This resolved the issue for me.
Is it the webdriverio client bindings that don't yet support the W3C Commands?
Is there someway to add the --jwp
argument without forking and rebuilding selenium?
Hello I am having the same issue running a remote script.
In my Windows 10 Pro Education, I am running these 2 commands in separate cmd windows: java -jar selenium-server-standalone-3.141.59.jar -port 4545 msedgedriver.exe (default port 9515)
In my test machine (Linux ubuntu 18 - Python 3.6.7 - Selenium 3.141.0) I am running my python script:
from selenium import webdriver
remote_selenium = 'http://10.216.139.12:4545/wd/hub'
targe_url = 'http://10.216.139.116'
# This next lines are what generate the failure
my_driver = webdriver.Remote(
command_executor=remote_selenium,
desired_capabilities=webdriver.DesiredCapabilities.EDGE
)
.....
my_drivers.get(targe_url)
Description of Windows 10:
Description of Linux testter machine:
I'm curious about why you are running in -jwp mode still. Is there functionality that is necessary for you in JWP that w3c does not provide?
I put this note in the bug report:
I have assigned this issue to a developer to take a look. We are hesitant to take changes to the driver given our move to Chromium and being focused on that; however, if the fix is not very risky, we’ll take it.
Hello John, thank you very much for your quick response, Sorry, maybe i express my problem incorrectly because I am not using Chome but Edge, my tests with Chrome, and Firefox pass correctly is just Edge the one that fails about the -jwp and --w3c modes I just added the parameter --w3c to my msedgedriver call but still have the same error.
What i see in the windows10 at the time I run my test, is that the Edge browser opens one time and the close and then opens again and the stays open but the window where i run the selenuin-server-standalone shows a failed as well as my run in the Linux machine.
LINUX - My code executed from an external Linux machine ran against the windows10 machine ( 10.216.139.12 ):
from selenium import webdriver webdriver.Remote(command_executor='http://*10.216.139.12*:4545/wd/hub', desired_capabilities=webdriver.DesiredCapabilities.EDGE)
LINUX - My logs of the run:
Connected to pydev debugger (build 181.4203.547)
Traceback (most recent call last):
File "/home/edgar/Downloads/pycharm-2017.2.3/helpers/pydev/pydevd.py",
line 1664, in
Windows10 - My msedgedriver call:
C:\Aruba\Automation\Webdrivers>C:\Aruba\Automation\Webdrivers\msedgedriver.exe --w3c Starting MSEdgeDriver 75.0.137.0 (2f3d804577162143ec43b15d92f1ab4db9de84cd) on port 9515 Only local connections are allowed. Please protect ports used by the WebDriver and related test frameworks to prevent access by malicious code.
Windows10 - My selenium-server-standalone call and its log when I execute the test: C:\Users\auto\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup>cd C:\Aruba\Automation
C:\Aruba\Automation>java -jar selenium-server-standalone-3.141.59.jar -port
4545 -debug
11:42:30.407 INFO [GridLauncherV3.parse] - Selenium server version:
3.141.59, revision: e82be7d358
11:42:30.751 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a
standalone Selenium Server on port 4545
2019-05-17 11:42:30.938:INFO::main: Logging initialized @1453ms to
org.seleniumhq.jetty9.util.log.StdErrLog
11:42:31.829 INFO [WebDriverServlet.
Sorry for confusing you. I know you mean "Edge" browser. What I meant is that since Edge (the new Edge) is based on Chromium, any changes to the Edge you are using would actually require a servicing change. When we service, we have to be super careful about regressions, so the bar for making changes is pretty high. We have to carefully balance risk/reward.
That's why I asked why you still need to run in --jpw mode. I'm curious what the benefits are for that, rather than moving to the standards method.
@edgramirez why are you running msedgedriver.exe
from the command line?
Sorry, I am not an experience selenium user, just a week ago was assigned to automate hundred of tests that will run in windows linux and mac with as much as browsers our servers will support and so i see that we can use the selenium-server-standalone. But I am afraid still not really catching what you mean by running in --jpw mode. I actually have not requirement to run in --jpw mode so i can run in --w3c mode. The last email logs were executing using msedgedriver --w3c mode. Is it the correct way to call the --w3c mode?
Thank you very much for your clarification is really appreciated.
On Fri, May 17, 2019 at 12:48 PM John Jansen notifications@github.com wrote:
Sorry for confusing you. I know you mean "Edge" browser. What I meant is that since Edge (the new Edge) is based on Chromium, any changes to the Edge you are using would actually require a servicing change. When we service, we have to be super careful about regressions, so the bar for making changes is pretty high. We have to carefully balance risk/reward.
That's why I asked why you still need to run in --jpw mode. I'm curious what the benefits are for that, rather than moving to the standards method.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SeleniumHQ/selenium/issues/6464?email_source=notifications&email_token=ALWOWWODKWFPIFLJ4IOLRBDPV3OUXA5CNFSM4FYHWWPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVVITJA#issuecomment-493521316, or mute the thread https://github.com/notifications/unsubscribe-auth/ALWOWWJD2LD6JO3ZURF4GLLPV3OUXANCNFSM4FYHWWPA .
The purpose of running in the command line was to see any output that it may generate. Also my test is execute from an external linux machine not from inside the Windows machine.
My OS is: 17763.107 And the drivers options I have are the latest release 75 or 17134 (this last one not sure will recognize the Edge version i have). but any way I am trying with both drivers one at a time adding the option --w3c
@thejohnjansen
I'm curious about why you are running in -jwp mode still. Is there functionality that is necessary for you in JWP that w3c does not provide?
I put this note in the bug report:
I have assigned this issue to a developer to take a look. We are hesitant to take changes to the driver given our move to Chromium and being focused on that; however, if the fix is not very risky, we’ll take it.
When I wanted to use the driver with Webdriver.io I could not get it to work, and got the impression that I needed jwp to make the tests run.
However it turned out I just needed the correct driver which is included in Windows since 1809. (But by then I forgot I had commented in this thread.)
Here is how I got it working:
Installation procedure: Settings - apps - manage optional features - add a feature - Microsoft webdriver
using this config:
{
"capabilities":
[
{
"browserName": "MicrosoftEdge",
"maxInstances": 5,
"version": "18.17763",
"seleniumProtocol": "WebDriver"
}
],
"hubHost": "<insert-selenium-grid-hub-url-here>",
"hubPort": 4444,
"cleanUpCycle": 2000,
"timeout": 30000,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 1,
"register": true,
"registerCycle": 5000,
"unregisterIfStillDownAfter": 10000,
"debug": false,
"role": "node"
}
Then add the node to the grid with this command:
java -jar "C:\selenium\selenium-server-standalone-3.141.59.jar" -role node -nodeConfig edge.json
I found that when I pass acceptInsecureCerts = true
with capabilities then Edge failed to start with message "Invalid Capabilities". (I see exactly the same log as described in "Actual behavior" of this ticket, see above)
When I remove this from capabilities or when I set to 'false' then driver successfully starts end executes base commands (navigate, findBy, click)
Here microsoft says that this capability is not supported. So it can be a bug in Microsoft webdriver.
local webdriver version - 3.141.59
selenium-server-standalone-3.141.59 (remote note, I connect to it without hub )
Microsoft Edge 44.18362.387.0
Microsoft EdgeHTML 18.18362
WebDriver version -- 10.0.18362.1 :: installed as suggested by microsoft: DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0
Are there any updates on this?
@lind-eduard can you elaborate what issue you are hitting?
@thejohnjansen I'm currently stuck at point where Edge is started, but I see blank page and error: Console: Error: Can't connect to WebDriver. Error: Failed to create session. Unable to parse remote response: Unknown error
Please make sure Selenium Server (ChromeDriver or PhantomJS) is running and accessible Selenium logs: 12:20:34.171 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.edge.EdgeDriverService) [12:20:34.258] - Listening on http://localhost:1946/ 12:20:42.827 WARN [RemoteSession$Factory.performHandshake] - Failed to connect to localhost/0:0:0:0:0:0:0:1:1946 java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:1946 at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:247) at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:165) at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257) at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135) at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) at okhttp3.RealCall.execute(RealCall.java:77) at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:103) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:102) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74) at org.openqa.selenium.grid.session.remote.RemoteSession$Factory.performHandshake(RemoteSession.java:147) at org.openqa.selenium.grid.session.remote.ServicedSession$Factory.apply(ServicedSession.java:161) at org.openqa.selenium.remote.server.ActiveSessionFactory.lambda$apply$12(ActiveSessionFactory.java:180) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:442) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543) at org.openqa.selenium.remote.server.ActiveSessionFactory.apply(ActiveSessionFactory.java:183) at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$null$2(NewSessionPipeline.java:66) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) at java.base/java.util.Collections$2.tryAdvance(Collections.java:4747) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543) at org.openqa.selenium.remote.server.NewSessionPipeline.lambda$createNewSession$3(NewSessionPipeline.java:69) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:174) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) at java.base/java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Streams.java:397) at java.base/java.util.stream.Streams$ConcatSpliterator.tryAdvance(Streams.java:720) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543) at org.openqa.selenium.remote.server.NewSessionPipeline.createNewSession(NewSessionPipeline.java:72) at org.openqa.selenium.remote.server.commandhandler.BeginSession.execute(BeginSession.java:65) at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:235) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:830) Caused by: java.net.ConnectException: Connection refused: no further information at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:579) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:549) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:339) at java.base/java.net.Socket.connect(Socket.java:585) at okhttp3.internal.platform.Platform.connectSocket(Platform.java:129) at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:245) ... 71 more 12:20:42.898 INFO [ActiveSessionFactory.apply] - Capabilities are: { "acceptInsecureCerts": true, "browserName": "MicrosoftEdge" }
Since I see that browser itself is started, I suppose that problems with session starting.
Thanks for the error, @lind-eduard . Can you share the code you used to create the driver? It's possible something is missing in the java language bindings.
I also wanted to make sure you saw this: https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium?tabs=c-sharp
As well as this tool we wrote: https://github.com/microsoft/edge-selenium-tools
Both are meant to help run MSEdgeDriver using Selenium 3 or 4.
@thejohnjansen Thanks for help. I found out how to set everything up
I went through the whole thread and the issue should not be relevant anymore, since all drivers work in W3C mode right now. If there is any issue while using Edge, please feel free to create a new issue with all the information required on the template.
selenium server node failed to start new session for edge
OS: Windows 10
Selenium Version: 3.14.0
Browser: Edge
Browser Version:
44.17763.1.0 WebDriver version: 10.0.17763
Expected Behavior -
New session starts for edge browser.
Actual Behavior -
Node fails to create new session with error in log:
Steps to reproduce -
1) Run selenium-standalone-server.jar on VM1 java -jar selenium-server-standalone-3.14.0.jar -debug -role hub 2) Run selenium-standalone-server.jar on VM2 as Edge node java "-Dwebdriver.edge.driver=C://Windows/System32/MicrosoftWebDriver.exe" "-Dwebdriver.edge.driver=C://selenium/driverlog" -jar selenium-server-standalone-3.14.0.jar -debuf -role node -nodeConfig edge_node_config.json edge_node_config.json contents:
So this probably related to one of last changes which supported --jwp & --w3c args for MicrosoftWebDriver, but if I manually add --jwp flag to executable path it will fail create instance of EdgeDriverService. Is there any way to strictly define which arguments should be passed to executable of EdgeDriver?