WebDriver.Protocol

Implements the HTTP JSON wire protocol for WebDriver. This is the internal protocol and is supposed to be called via the WebDriver session server rather than directly.

https://code.google.com/p/selenium/wiki/JsonWireProtocol

All these calls take a WebDriver.Config record as a first parameter. The other parameters depend on the specific protocol call.

All successful calls return {:ok, response} where response is a WebDriver.Protocol.Response record.

Failed calls return {:error, status, body} where the status is the HTTP status returned and the body is the raw body of the returned response.

A WebDriver response consists of a session id, status and return value. The session id is an opaque string provided by the server. The status can be one of the WebDriver status codes: https://code.google.com/p/selenium/wiki/JsonWireProtocol#/status

The value varies according to the call made.

The Response struct defined here also appends the request details to that response.

Source

Summary

accept_alert(root_url, session_id)

Accepts the currently displayed alert dialog https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/accept_alert

active_element(root_url, session_id)

Get the element on the page that currently has focus. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/active

alert_text(root_url, session_id)

Gets the text of the currently displayed JavaScript alert(), confirm(), or prompt() dialog. https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/alert_text

alert_text(root_url, session_id, parameters)

Sends keystrokes to a Javascript prompt() dialog

attribute(root_url, session_id, element_id, name)

Returns the value of the given element’s attribute. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/attribute/:name

back(root_url, session_id)

Navigate back to the previous page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/back

clear(root_url, session_id, element_id)

Clears the specified form field or textarea element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/clear

click(root_url, session_id, element_id)

Click on the specified element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/click

close_window(root_url, session_id)

Closes the current window. https://code.google.com/p/selenium/wiki/JsonWireProtocol#DELETE_/session/:sessionId/window

cookies(root_url, session_id)

Retreive all the cookies associated with the current page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/cookie

css(root_url, session_id, element_id, property_name)

Get the computed value of an element’s CSS property. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/css/:propertyName

delete_cookie(root_url, session_id, name)

Delete the cookie with the given name. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/cookie/:name

delete_cookies(root_url, session_id)

Delete all cookies for the current page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#DELETE_/session/:sessionId/cookie

dismiss_alert(root_url, session_id)

Dismisses the currently displayed alert dialog https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/dismiss_alert

displayed(root_url, session_id, element_id)

Returns a boolean denoting if the element is currently visible. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/displayed

element(root_url, session_id, parameters)

Retreive an element from the page using the specified search strategy. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element

element(root_url, session_id, element_id, parameters)

Retreive an element from the page starting from the specified element using the specified search strategy. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/element

element_by_id(root_url, session_id, element_id)

Get the element identified by the id. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id

elements(root_url, session_id, parameters)

Retreive all elements from the page using the specified search strategy. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element

elements(root_url, session_id, element_id, parameters)

Retreive all elements starting from the specified element using the specified search strategy. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/elements

enabled(root_url, session_id, element_id)

Returns a boolean denoting if the element is enabled or not. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/enabled

equals(root_url, session_id, element_id, other_id)

Determine if two element ids refer to the same DOM element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/equals/:other

execute(root_url, session_id, parameters)

Execute Javascript on the page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/execute

execute_async(root_url, session_id, parameters)

Execute asynchronous Javascript on the page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/execute_async

forward(root_url, session_id)

Navigate forward to the next page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/forward

frame(root_url, session_id, parameters)

Change the frame that has focus in the current window. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/frame

geo_location(root_url, session_id)

Retreive the current geo location of the browser. https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/location

geo_location(root_url, session_id, parameters)

Set the current geo location of the browser. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/location

ime(root_url, session_id)

IME FUNCTIONS ARE NOT YET IMPLEMENTED

keys(root_url, session_id, parameters)

Send a list of keystrokes to the currently active element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/keys

local_storage()

LOCAL STORAGE NOT YET IMPLEMENTED

location(root_url, session_id, element_id)

Returns the current location of the specified element https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/location

location_in_view(root_url, session_id, element_id)

Determine an element’s location once it has been scrolled into view. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/location_in_view

maximize_window(root_url, session_id, window_handle \\ "current")

Maximise the specified window. Use “current” or simply do not specify a handle to maximise the current window

mouse_button_down(root_url, session_id, parameters \\ %{})

Send a mouse button down event. The parameter is a number indicating which button is to be pressed. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/buttondown Defaults to the left button if not specified

mouse_button_up(root_url, session_id, parameters \\ %{})

Send a mouse button up event. Every button down event needs to be followed by this. The parameter is a number indicating which button is to be raised. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/buttondown Defaults to the left button if not specified

mouse_click(root_url, session_id, parameters \\ %{})

Send a mouse click at the position of the last move_to command. The parameter is a number indicating which button is to be clicked. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/click Defaults to the left button if not specified

mouse_double_click(root_url, session_id, parameters \\ %{})

Send a double click at the position of the last move_to command. The parameter is a number indicating which button is to be double clicked. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/click Defaults to the left button if not specified

move_to(root_url, session_id, parameters)

Move the mouse by an offset to the specified element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/moveto

name(root_url, session_id, element_id)

Get the name of the specified element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/name

orientation(root_url, session_id)

Get the current browser screen orientation. https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/orientation

orientation(root_url, session_id, parameters)

Set the current browser screen orientation https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/orientation

refresh(root_url, session_id)

Refresh the current page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/refresh

screenshot(root_url, session_id)

Retreive a screenshot of the current page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/screenshot

selected(root_url, session_id, element_id)

Returns a boolean denoting if the element is selected or not. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/selected

session(root_url, session_id)

Retreive information about a session. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId

sessions(root_url, session_id \\ :null)

Gets a list of all sessions on the server. https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/sessions

set_async_script_timeout(root_url, session_id, parameters)

Set the script timeout for the session. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/timeouts/async_script

set_cookie(root_url, session_id, parameters)

Set a cookie for the current page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/cookie

set_implicit_wait_timeout(root_url, session_id, parameters)

Set the implicit wait timeout for the session. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/timeouts/implicit_wait

set_timeout(root_url, session_id, parameters)

Set timeouts on the server. Parameters must include the type of timeout and the length in milliseconds (ms). Valid types are “script” and “implicit”

shutdown(root_url)
size(root_url, session_id, element_id)

Get the size of an element in pixels. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/size

source(root_url, session_id)

Retreive the curent page source. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/source

start_session(root_url, parameters)

Creates a new session on the server. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session

status(root_url, session_id \\ :null)

Returns the status of the WebDriver server. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/status

stop_session(root_url, session_id)

Stop the current session on the server. https://code.google.com/p/selenium/wiki/JsonWireProtocol#DELETE_/session/:sessionId

submit(root_url, session_id, element_id)

Submit a FORM element. May be applied to any descendent of a FORM element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/submit

text(root_url, session_id, element_id)

Retreives the visible text of the element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/text

title(root_url, session_id)

Retreive the current page title. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/title

touch_click(root_url, session_id, parameters)

Finger tap on an element on the screen. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/click

touch_double_click(root_url, session_id, parameters)

Double finger tap on an element on the screen. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/doubleclick

touch_down(root_url, session_id, parameters)

Finger down on the screen. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/down

touch_flick(root_url, session_id, parameters)

Flick on the touch screen using finger motion events. The element, xoffset and yoffset parameters are optional if you do not care where the flick starts. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/flick

touch_long_click(root_url, session_id, parameters)

Long finger tap on an element on the screen. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/longclick

touch_move(root_url, session_id, parameters)

Move the finger on the screen to the specified position. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/move

touch_scroll(root_url, session_id, parameters)

Scroll on the touch screen using finger based motion events. The element parameter is optional and can be left out if you dont care where the scroll starts. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_session/:sessionId/touch/scroll

touch_up(root_url, session_id, parameters)

Finger up on the screen https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/up

url(root_url, session_id)

Retreive the URL of the current page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/url

url(root_url, session_id, parameters)

Navigate to a new URL. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/url

value(root_url, session_id, element_id, parameters)

Send a list of keystrokes to the specified element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/element/:id/value

window(root_url, session_id, parameters)

Change the focus to another window. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/window

window_handle(root_url, session_id)

Get the current window handle for the session. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/window_handle

window_handles(root_url, session_id)

Retreive a list of window handles available for the session. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/window_handles

window_position(root_url, session_id, window_handle \\ "current", parameters \\ :null)

Retreive the window position for the specified window or if not specified, the current window. https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/window/:windowHandle/position

window_size(root_url, session_id, window_handle \\ "current", parameters \\ :null)

Retreive the window size. If a window handle is not specified it retreives the current window

Functions

accept_alert(root_url, session_id)
Source
active_element(root_url, session_id)
Source
alert_text(root_url, session_id)

Gets the text of the currently displayed JavaScript alert(), confirm(), or prompt() dialog. https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/alert_text

Source
alert_text(root_url, session_id, parameters)

Sends keystrokes to a Javascript prompt() dialog.

Source
attribute(root_url, session_id, element_id, name)
Source
back(root_url, session_id)
Source
clear(root_url, session_id, element_id)
Source
click(root_url, session_id, element_id)
Source
close_window(root_url, session_id)
Source
cookies(root_url, session_id)

Retreive all the cookies associated with the current page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/cookie

Source
css(root_url, session_id, element_id, property_name)
Source
delete_cookie(root_url, session_id, name)
Source
delete_cookies(root_url, session_id)
Source
dismiss_alert(root_url, session_id)
Source
displayed(root_url, session_id, element_id)

Returns a boolean denoting if the element is currently visible. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/displayed

Source
element(root_url, session_id, parameters)

Retreive an element from the page using the specified search strategy. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element

Parameters [using: "class name" | "css selector" | "id" | "name" | "link text" | "partial link test" | "tag name" | "xpath", value: string]

Source
element(root_url, session_id, element_id, parameters)

Retreive an element from the page starting from the specified element using the specified search strategy. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/element

Parameters [using: "class name" | "css selector" | "id" | "name" | "link text" | "partial link test" | "tag name" | "xpath", value: string]

Source
element_by_id(root_url, session_id, element_id)
Source
elements(root_url, session_id, parameters)

Retreive all elements from the page using the specified search strategy. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element

Parameters [using: "class name" | "css selector" | "id" | "name" | "link text" | "partial link test" | "tag name" | "xpath", value: string]

Source
elements(root_url, session_id, element_id, parameters)

Retreive all elements starting from the specified element using the specified search strategy. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/elements

Parameters [using: "class name" | "css selector" | "id" | "name" | "link text" | "partial link test" | "tag name" | "xpath", value: string]

Source
enabled(root_url, session_id, element_id)
Source
equals(root_url, session_id, element_id, other_id)
Source
execute(root_url, session_id, parameters)

Execute Javascript on the page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/execute

Parameters: [script: string, args: list]

## Example:

iex> config = WebDriver.Config[host: "localhost", port: 8080]
iex> sid = WebDriver.Protocol.start_session(config, [desiredCapabilities: []]).session_id
iex> resp = WebDriver.Protocol.execute(config, sid, [script: "return 1+1", args: []])
iex> resp.value
2
Source
execute_async(root_url, session_id, parameters)

Execute asynchronous Javascript on the page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/execute_async

Parameters: [script: string, args: list]

Source
forward(root_url, session_id)
Source
frame(root_url, session_id, parameters)

Change the frame that has focus in the current window. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/frame

Parameters: [id: string | number | :null | WebElement]

Source
geo_location(root_url, session_id)
Source
geo_location(root_url, session_id, parameters)

Set the current geo location of the browser. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/location

Parameters: [lattitude: number, longitude: number, altitude: number]

Source
ime(root_url, session_id)

IME FUNCTIONS ARE NOT YET IMPLEMENTED

Source
keys(root_url, session_id, parameters)

Send a list of keystrokes to the currently active element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/keys

Parameters: [value: Array]

Source
local_storage()

LOCAL STORAGE NOT YET IMPLEMENTED

Source
location(root_url, session_id, element_id)
Source
location_in_view(root_url, session_id, element_id)

Determine an element’s location once it has been scrolled into view. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/location_in_view

Source
maximize_window(root_url, session_id, window_handle \\ "current")

Maximise the specified window. Use “current” or simply do not specify a handle to maximise the current window.

Source
mouse_button_down(root_url, session_id, parameters \\ %{})

Send a mouse button down event. The parameter is a number indicating which button is to be pressed. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/buttondown Defaults to the left button if not specified.

Parameters: [button: 1(left) | 2(middle) | 3(right)]

Source
mouse_button_up(root_url, session_id, parameters \\ %{})

Send a mouse button up event. Every button down event needs to be followed by this. The parameter is a number indicating which button is to be raised. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/buttondown Defaults to the left button if not specified.

Parameters: [button: 1(left) | 2(middle) | 3(right)]

Source
mouse_click(root_url, session_id, parameters \\ %{})

Send a mouse click at the position of the last move_to command. The parameter is a number indicating which button is to be clicked. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/click Defaults to the left button if not specified.

Parameters: [button: 1(left) | 2(middle) | 3(right)]

Source
mouse_double_click(root_url, session_id, parameters \\ %{})

Send a double click at the position of the last move_to command. The parameter is a number indicating which button is to be double clicked. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/click Defaults to the left button if not specified.

Parameters: [button: 1(left) | 2(middle) | 3(right)]

Source
move_to(root_url, session_id, parameters)

Move the mouse by an offset to the specified element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/moveto

Parameters: [element: element_id, offsetx: number, offsety: number]

Source
name(root_url, session_id, element_id)
Source
orientation(root_url, session_id)
Source
orientation(root_url, session_id, parameters)
Source
refresh(root_url, session_id)
Source
screenshot(root_url, session_id)

Retreive a screenshot of the current page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/screenshot

Returns a base64 encoded PNG image.

Source
selected(root_url, session_id, element_id)
Source
session(root_url, session_id)
Source
sessions(root_url, session_id \\ :null)
Source
set_async_script_timeout(root_url, session_id, parameters)
Source
set_cookie(root_url, session_id, parameters)

Set a cookie for the current page. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/cookie

Parameters: [cookie: object]

Source
set_implicit_wait_timeout(root_url, session_id, parameters)

Set the implicit wait timeout for the session. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/timeouts/implicit_wait

Parameters: [ms: number]

Source
set_timeout(root_url, session_id, parameters)

Set timeouts on the server. Parameters must include the type of timeout and the length in milliseconds (ms). Valid types are “script” and “implicit”

Parameters [type: "script"|"implicit", ms: number]

Source
shutdown(root_url)
Source
size(root_url, session_id, element_id)
Source
source(root_url, session_id)
Source
start_session(root_url, parameters)

Creates a new session on the server. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session

Parameters: [desiredCapabilities: WebDriver.Protocol.Capabilities] ## Examples:

iex> config = WebDriver.Config[host: "localhost", port: 8080]
iex> resp = WebDriver.Protocol.start_session(config, [desiredCapabilities: []])
iex> resp.session_id
"370f0750-e1dd-11e2-af7a-8562953caa56"
Source
status(root_url, session_id \\ :null)

Returns the status of the WebDriver server. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/status

## Examples:

iex> config = WebDriver.Config[host: "localhost", port: 8080]
iex> resp = WebDriver.Protocol.status(config)
iex> resp.status
0
iex> resp.session_id
:null
iex> resp.value
[{"build",[{"version","1.0.3"}]},{"os",[{"name","mac"},{"version","10.8 (Mountain Lion)"},{"arch","32bit"}]}]
Source
stop_session(root_url, session_id)
Source
submit(root_url, session_id, element_id)

Submit a FORM element. May be applied to any descendent of a FORM element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/submit

Source
text(root_url, session_id, element_id)
Source
title(root_url, session_id)
Source
touch_click(root_url, session_id, parameters)

Finger tap on an element on the screen. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/click

Parameters: [element: element_id] The element to tap on.

Source
touch_double_click(root_url, session_id, parameters)

Double finger tap on an element on the screen. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/doubleclick

Parameters: [element: element_id] The element to tap on.

Source
touch_down(root_url, session_id, parameters)

Finger down on the screen. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/down

Parameters: [x: number, y: number]

Source
touch_flick(root_url, session_id, parameters)

Flick on the touch screen using finger motion events. The element, xoffset and yoffset parameters are optional if you do not care where the flick starts. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/flick

Parameters: [element: element_id, xoffset: number, yoffset: number, xSpeed: number, ySpeed: number]

Source
touch_long_click(root_url, session_id, parameters)

Long finger tap on an element on the screen. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/longclick

Parameters: [element: element_id] The element to tap on.

Source
touch_move(root_url, session_id, parameters)

Move the finger on the screen to the specified position. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/move

Parameters: [x: number, y: number]

Source
touch_scroll(root_url, session_id, parameters)

Scroll on the touch screen using finger based motion events. The element parameter is optional and can be left out if you dont care where the scroll starts. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_session/:sessionId/touch/scroll

Parameters [element: element, x: number, y:number]

Source
touch_up(root_url, session_id, parameters)

Finger up on the screen https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/touch/up

Parameters: [x: number, y: number]

Source
url(root_url, session_id)
Source
url(root_url, session_id, parameters)
Source
value(root_url, session_id, element_id, parameters)

Send a list of keystrokes to the specified element. https://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/element/:id/value

Parameters: [value: Array]

Source
window(root_url, session_id, parameters)

Change the focus to another window. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/window

The window may be specified by the server assigned window handle or the value of it’s name attribute.

Parameters: [name: string]

Source
window_handle(root_url, session_id)
Source
window_handles(root_url, session_id)

Retreive a list of window handles available for the session. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/window_handles

Source
window_position(root_url, session_id, window_handle \\ "current", parameters \\ :null)

Retreive the window position for the specified window or if not specified, the current window. https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/window/:windowHandle/position

Set the window position for the specified window if parameters are sent. Set window handle to “current” to set the current window position.

Parameters: [x: number, y: number]

Source
window_size(root_url, session_id, window_handle \\ "current", parameters \\ :null)

Retreive the window size. If a window handle is not specified it retreives the current window.

https://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/session/:sessionId/window/:windowHandle/size

When the parameters are specified this will change the window size. https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/window/:windowHandle/size

Parameters: [height: number, width: number]

Source