-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Description
Description
I use a Docker Selenium Grid and use BiDi with C#. My Grid has a Hub, some nodes, some video containers. For the Nodes I set SE_NODE_GRID_URL=http://selenium-hub:4444. I am running Docker in WSl2 (Ubuntu) on my Windows 10 machine, and executing C# code on the Windows 10 machine itself. If I do this and then execute this code:
seleniumRemoteWebDriver.AsBiDiAsync().GetAwaiter().GetResult();
I get this exception:
Message:β
System.Net.WebSockets.WebSocketException : Unable to connect to the remote server
----> System.Net.Http.HttpRequestException : No such host is known. (selenium-hub:4444)
----> System.Net.Sockets.SocketException : No such host is known.
Stack Trace:β
WebSocketHandle.ConnectAsync(Uri uri, HttpMessageInvoker invoker, CancellationToken cancellationToken, ClientWebSocketOptions options)
ClientWebSocket.ConnectAsyncCore(Uri uri, HttpMessageInvoker invoker, CancellationToken cancellationToken)
WebSocketTransport.ConnectAsync(CancellationToken cancellationToken)
Broker.ConnectAsync(CancellationToken cancellationToken)
BiDi.ConnectAsync(String url)
WebDriverExtensions.AsBiDiAsync(IWebDriver webDriver)
If instead I use SE_NODE_GRID_URL=http://localhost:4444 then BiDi is created fine. If I am not using BiDi then the web driver works fine with either localhost or selenium-hub in the SE_NODE_GRID_URL
Reproducible Code
N/A