OpenQA.Selenium.WebDriverException: 'The newSession command returned an unexpected error. '

619 views
Skip to first unread message

Primus Pares

unread,
Mar 27, 2023, 4:25:09 AM3/27/23
to Selenium Users
Hello world! I'm trying to connect to and manage an already running chromium at 127.0.0.1:4444.Here's my C# code:
ChromeOptions options = new ChromeOptions();
Uri serverUri = new Uri("http://127.0.0.1:4444/wd/hub");
IWebDriver driver = new RemoteWebDriver(serverUri, options. ToCapabilities()); I have been suffering with this issue for two days now, but I get this error: OpenQA.Selenium.WebDriverException: 'The newSession command returned an unexpected error. '
Can anyone know and tell me?

Primus Pares

unread,
Mar 27, 2023, 4:25:09 AM3/27/23
to Selenium Users

Adrian

unread,
Mar 28, 2023, 4:53:55 PM3/28/23
to Selenium Users
Hi,
Maybe try:
ChromeOptions options = new ChromeOptions();
WebDriver driver = new RemoteWebDriver(new URL("http://127.0.0.1:4444/wd/hub"), ChromeOptions);


Cheers,
Adrian.
Reply all
Reply to author
Forward
0 new messages