Start a session
Start a session
the future session id
Stop an established session.
Stop an established session. Performed on a best-effort basis.
the session to stop.
Execute some JS code and return the status of execution.
Execute some JS code and return the status of execution. Any args are passed to the script as args[]. The script must also declare a result as a variable e.g.
var result = "some result";. This result variable will be looked for in the global scope and errors will occur if it is not found. var result = "some result"; variable will be looked for in the global scope and errors will occur if it is not found.
the session
the script to execute
a json array declaring the arguments to pass to the script
the return value of the script's execution as a json value
Similar to com.typesafe.webdriver.WebDriverCommands.executeJs, this method executes JavaScript code.
Similar to com.typesafe.webdriver.WebDriverCommands.executeJs, this method executes JavaScript code. However the code is executed directly on the JavaScript engine. What this actually means will depend on the underlying JavaScript engine. In the case of PhantomJS for example, the full PhantomJS API is available. For HtmlUnit the underlying JavaScript engine (at this time, Rhino) will be available. The implementation of this method is entirely optional. If a particular type of Browser does not support it then an error will be returned.
the session
the script to execute
a json array declaring the arguments to pass to the script
the return value of the script's execution as a json value
Navigate to a new URL.
Navigate to a new URL. POST /session/:sessionId/url
the session
the url to navigate to
https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/url
Take a screenshot of the current window.
Take a screenshot of the current window. GET /session/:sessionId/screenshot
the session
https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/screenshot
Encapsulates all of the request/reply commands that can be sent via the WebDriver protocol. All commands perform asynchronously and are non-blocking.