wallaby v0.5.0 Wallaby.Driver

Implements the webdriver protocol for Phantomjs

Summary

Functions

Gets the value of an elements attribute

Clears the value in an element

Clicks an element

Creates a new session with the driver

Gets the current url

Checks if the node is being displayed

Executes javascript synchoronously, taking as arguments the script to execute, and optionally a list of arguments available in the script via arguments

Finds an element on the page for a session. If an element is provided then the query will be scoped to within that element

Gets the size of the window

Gets the height, width, x, and y position of an Element

Gets the selected value of the element

Sends a list of key strokes to active element

Sends text characters to the active element

Sets the value of an element

Sets the size of the window

Gets the size of a node

Takes a screenshot

Gets the text for an element

Visits a specific page

Types

method :: :post | :get | :delete
params :: %{using: String.t, value: query}

Functions

attribute(node, name)

Gets the value of an elements attribute

clear(node)

Clears the value in an element

click(node)

Clicks an element

create(server, opts)

Creates a new session with the driver.

current_url(session)

Gets the current url.

displayed(node)

Checks if the node is being displayed.

This is based on what is available in phantom and doesn’t match the current specification.

execute_script(session, script, arguments \\ [])

Executes javascript synchoronously, taking as arguments the script to execute, and optionally a list of arguments available in the script via arguments

find_elements(session, query)

Finds an element on the page for a session. If an element is provided then the query will be scoped to within that element.

get_window_size(session)

Gets the size of the window

rect(node)

Gets the height, width, x, and y position of an Element.

This is based on the standard but currently is un-supported by Phantom.

selected(node)

Gets the selected value of the element.

For Checkboxes and Radio buttons it returns the selected option. For options selects it returns the selected option

send_keys(session, keys)

Sends a list of key strokes to active element

send_text(session, text)

Sends text characters to the active element

set_value(node, value)

Sets the value of an element.

set_window_size(session, width, height)

Sets the size of the window.

size(node)

Gets the size of a node.

This is non-standard and only works in Phantom.

take_screenshot(session)

Takes a screenshot.

text(node)

Gets the text for an element

visit(session, path)

Visits a specific page.