Sai
Sai

Reputation: 389

Getting error message in Edge 'JSON wire protocol command endpoint is not allowed' when server uses w3c

When we run the script using Microsoft Edge getting the below error :

The following JSON wire protocol command endpoint is not allowed when server is running in W3C mode. GET /shutdown

What I understand is that Edge now supports W3C mode by default. Our Java binding is sending in Json wire protocol mode(JWP). How we can instruct to Microsoft WebDriver that use JWP mode instead of W3c mode

it was mentioned in the Microsoft documentation:

w3c Use W3C WebDriver protocol (default option) 17763
jwp Use JSON Wire protocol

https://learn.microsoft.com/en-us/microsoft-edge/webdriver

Could you please let me know how we can change from W3C mode to jwp mode?

Upvotes: 1

Views: 1033

Answers (2)

PAX
PAX

Reputation: 1156

Another workaround is to specify an intermediate script for the Edge Driver which:

  • Invokes the actual Edge Driver executable,
  • passes all invocation parameters to it and
  • additionally adds the "jwp" parameter.

For instance, I've created a batch file edgedriver.bat with following content:

C:\Windows\System32\MicrosoftWebDriver.exe %* --jwp

And on startup of my node I specify this batch file as driver for Edge:

java -Dwebdriver.edge.driver="D:\Driver\edgedriver.bat"^
     -Dwebdriver.ie.driver="D:\Driver\IEDriverServer.exe"^
     -Dwebdriver.chrome.driver="D:\Driver\chromedriver.exe"^
     -jar D:\Vaadin_Testbench_Node\vaadin-testbench-standalone-5.1.2.jar^
     -role node^
     -nodeConfig D:\Vaadin_Testbench_Node\nodeconfig.json

Upvotes: 3

Deepak-MSFT
Deepak-MSFT

Reputation: 11335

Try to add line below in file EdgeDriverService.java

argsBuilder.add("--jwp");

It can help web driver to launch in jwp mode.

Reference:

selenuim server node 3.14.0 failed to start new session for Edge #6464

Upvotes: 0

Related Questions