seleniumselenium-webdriverwebdriverw3cwebdriver-w3c-spec

Difference between JsonWireProtocol mechanisms and the new standards in W3C Living Document when using Selenium


I'm wondering what are the differences between the mechanisms in JsonWireProtocol (Status: OBSOLETE) and W3C Living Document from 31 December 2019 (the new standard) when using Selenium for UI tests. I know that Selenium have used the following: When we make a new instance of a driver (C#):

using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
IWebDriver driver = new ChromeDriver();

we actually make a POST /session request to the selenium server. After that via JsonWireProtocol and, in example:

POST /session/:sessionId/element/:id/click, we can find and click on particular element, or make some other actions with the other requests...

So what are the new things nowadays? Can someone explain the new standard?! I will be very happy if someone do that in-depth!

WebDriver W3C Living Document 31 December 2019

JsonWireProtocol


Solution

  • The WebDriver Wire Protocol

    The initial WebDriver Wire Protocol draft was a proposal that, all implementations of WebDriver that would communicate with the browser, or a RemoteWebDriver server shall use a common wire protocol. This wire protocol defined a RESTful web service using JSON over HTTP.

    As per the initial proposal and practice some of the JSON Objects were as follows:

    WebElement JSON Object


    WebDriver W3C Specification

    With the introduction of WebDriver W3C Specification the following standards were defined:


    Commands

    The WebDriver protocol is organised into commands. Each HTTP request with a method and template defined in this specification represents a single command, and therefore each command produces a single HTTP response. In response to a command, a remote end will run a series of actions known as remote end steps. These provide the sequences of actions that a remote end takes when it receives a particular command.


    Endpoints

    The table of endpoints below lists the method and URI template for each endpoint node command and their current support in ChromeDriver.

    chromeScreenshot

    Outro

    What is the difference between Protocol and Json Wire Protocol