JSON Wire Protocol
- The JSON Wire Protocol (JSONWP) is the version of the WebDriver spec currently implemented by all the Selenium clients. The JSON wire protocol (JSONWP) is a transport mechanism created by WebDriver developers.
- The JSONWP is the abstract specification of how automation behaviours are mapped to Selenium server HTTP requests and responses.
- The purpose of WebDriver and JSONWP is the automated testing of websites via a browser such as Firefox driver, IE driver and Chrome driver.
- The wire protocol is implemented in request/response pairs of "commands" and "responses".
- We need JSONWP for client/server implementation.
We want a client/server implementation:
- Write test in any language
- Selenium Grid
- Sauce Labs Cloud Services
- Multiple Server Implementation
Mobile JSON Wire Protocol
- Appium implements the Mobile JSONWP
- MJSONWP extension to the Selenium JSONWP
- It controls the different mobile device behaviors, such as installing/uninstalling apps over the session.
- Appium, Selendroid and ios-drive have implemented all or some of MJ
- MJSONWP also updated locator strategies related to native UI for class name, id and xpath
- It defined new locator strategies like accessibility id, android uiautomator and iosuiautomation.
- It allow modify the network connectivity state of the devices like Airplane mode, data mode or wifi mode.
- The need for automation of native and hybrid mobile applications can be met by the extension of the JSONWP, which already has a proven basic automation framework (architecture, interaction model, etc...).