wallaby v0.16.1 Wallaby.Phantom.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

Gets the current url

Deletes a session with the driver

Checks if the element 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

Retrieves logs from the browser

Retrives the current page source from session

Gets the title of the current page

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

Sets the value of an element

Sets the size of the window

Gets the size of a element

Takes a screenshot

Gets the text for an element

Visits a specific page

Types

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

Functions

attribute(element, name)

Gets the value of an elements attribute

check_for_response_errors(response)
check_logs!(session, fun)
clear(element)

Clears the value in an element

click(element)

Clicks an element

create(server, opts)
current_path!(session)
current_url(session)

Gets the current url.

current_url!(session)
delete(session)

Deletes a session with the driver.

displayed(element)

Checks if the element is being displayed.

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

displayed!(element)
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(parent, locator)

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

headers()
log(session)

Retrieves logs from the browser

page_source(session)

Retrives the current page source from session

page_title(session)

Gets the title of the current page.

rect(element)

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

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

request_opts()
selected(element)

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

set_value(element, value)

Sets the value of an element.

set_window_size(session, width, height)

Sets the size of the window.

size(element)

Gets the size of a element.

This is non-standard and only works in Phantom.

take_screenshot(session)

Takes a screenshot.

text(element)

Gets the text for an element

visit(session, path)

Visits a specific page.