microsoft / edge-selenium-tools

An updated EdgeDriver implementation for Selenium 3 with newly-added support for Microsoft Edge (Chromium).
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Apache License 2.0
88 stars 24 forks source link

C# edge remote driver error on selenium 4 #28

Closed fnrcum closed 3 years ago

fnrcum commented 3 years ago

Does anyone have any examples on how to use the Remote webdriver in C#?

So far i'm doing this:

new RemoteWebDriver(new Uri(RemoteEndPoint), options.ToCapabilities(), TimeSpan.FromMinutes(5))

It seems to work fine but when going on my Ubuntu docker container with edge installed I get this:

root@docker-desktop:/# java -jar standalone.jar node --publish-events tcp://x.x.x.x:4442 --subscribe-events tcp://x.x.x.x:4443
23:38:49.189 INFO [LoggingOptions.getTracer] - Using OpenTelemetry for tracing
23:38:49.190 INFO [LoggingOptions.createTracer] - Using OpenTelemetry for tracing
23:38:49.223 INFO [EventBusOptions.createBus] - Creating event bus: org.openqa.selenium.events.zeromq.ZeroMqEventBus
23:38:49.276 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://x.x.x.x:4442 and tcp://x.x.x.x:4443
23:38:49.307 INFO [UnboundZmqEventBus.<init>] - Sockets created
23:38:49.310 INFO [UnboundZmqEventBus.lambda$new$2] - Bus started
23:38:49.593 INFO [NodeServer.execute] - Reporting self as: http://x.x.x.x:5555
23:38:49.653 INFO [NodeOptions.report] - Adding Edge for {"browserName": "MicrosoftEdge"} 2 times
23:38:49.850 INFO [NodeServer.execute] - Started Selenium node 4.0.0-alpha-6 (revision 5f43a29cfc): http://x.x.x.x:5555
23:38:49.857 INFO [NodeServer.execute] - Starting registration process for node id 70381472-494c-476f-806b-03710e29ac2f
23:38:50.097 INFO [NodeServer.lambda$execute$0] - Node has been added
/msedgedriver: 1: Syntax error: ")" unexpected     (These errors are from the tests running)
/msedgedriver: 1: Syntax error: ")" unexpected     (These errors are from the tests running)

I'm not sure what I am doing wrong since I see the Python version seems to be a whole lot simpler.

miksch123 commented 3 years ago

How does your driver and options code look like for such a test?

bwalderman commented 3 years ago

Hi @fnrcum. Please report Selenium 4 issues at the official Selenium repo here: https://github.com/SeleniumHQ/selenium

edge-selenium-tools is a compatibility library to be used with Selenium 3 only. It is not necessary to use this library with Selenium 4 because Selenium 4 already has support for Edge Chromium built in.