JSON Wire Protocol
The JSONWireProtocol is deprecated and replaced by the WebDriver protocol.
status
Query the server's current status. The server should respond with a general "HTTP 200 OK" response if it is alive and accepting commands. The response body should be a JSON object describing the state of the server. All server implementations should return two basic objects describing the server's current platform and when the server was built. All fields are optional; if omitted, the client should assume the value is unknown. Furthermore, server implementations may include additional fields not listed here.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.status()
Returns
- <Object>
status
: An object describing the general status of the server.
newSession
Create a new session. The server should attempt to create a session that most closely matches the desired and required capabilities. Required capabilities have higher priority than desired capabilities and must be set for the session to be created.
JSON Wire Protocol command. More details can be found in the official protocol docs.
Usage
browser.newSession(desiredCapabilities, requiredCapabilities)
Parameters
Name | Type | Details |
---|---|---|
desiredCapabilities | object | An object describing the session's desired capabilities. |
requiredCapabilities optional | object | An object describing the session's required capabilities (Optional). |
Returns
- <Object>
capabilities
: An object describing the session's capabilities.
getSessions
Returns a list of the currently active sessions. Each session will be returned as a list of JSON objects containing id
and capabilities
.
JSON Wire Protocol command. More details can be found in the official protocol docs.
This protocol command is deprecated
This command is deprecated and likely not supported by any browser.
Usage
browser.getSessions()
Returns
- <Object[]>
capabilities
: A list of the currently active sessions.
getSession
Retrieve the capabilities of the specified session.
JSON Wire Protocol command. More details can be found in the official protocol docs.
This protocol command is deprecated
This command is deprecated and likely not supported by any browser.
Usage
browser.getSession()
Returns
- <Object>
capabilities
: An object describing the session's capabilities.
deleteSession
Delete the session.
JSON Wire Protocol command. More details can be found in the official protocol docs.