wallaby v0.9.0 Wallaby.Node
Common functionality for interacting with DOM nodes.
Summary
Functions
Finds all of the DOM nodes that match the css selector. If no elements are found then an empty list is immediately returned
Matches the Node’s content with the provided text and raises if not found
Gets the value of the nodes attribute
Marks a checkbox as “checked”
Checks if the node has been selected
Chooses a radio button
Clears an input field. Input nodes are looked up by id, label text, or name. The node can also be passed in directly
Clicks a node
Fills in the node with the supplied value
Finds a specific DOM node on the page based on a css selector. Blocks until it either finds the node or until the max time is reached. By default only 1 node is expected to match the query. If more nodes are present then a count can be specified. By default only nodes that are visible on the page are returned
Searches for CSS on the page
Searches for css that should not be on the page
Matches the Node’s content with the provided text
Matches the Node’s value with the provided value
Gets the selected value of the element
Checks if the node has been selected. Alias for checked?(node)
Gets the Node’s text value
Unchecks a checkbox
Checks if the node is visible on the page
Types
Functions
Finds all of the DOM nodes that match the css selector. If no elements are found then an empty list is immediately returned.
Matches the Node’s content with the provided text and raises if not found
Specs
clear(Wallaby.Node.t) :: Wallaby.Session.t
Clears an input field. Input nodes are looked up by id, label text, or name. The node can also be passed in directly.
Specs
fill_in(Wallaby.Node.t, [{:with, String.t}]) :: Wallaby.Node.t
Fills in the node with the supplied value
Finds a specific DOM node on the page based on a css selector. Blocks until it either finds the node or until the max time is reached. By default only 1 node is expected to match the query. If more nodes are present then a count can be specified. By default only nodes that are visible on the page are returned.
Selections can be scoped by providing a Node as the locator for the query.
Searches for css that should not be on the page
Matches the Node’s content with the provided text
Specs
has_value?(t, any) :: boolean
Matches the Node’s value with the provided value.
Specs
selected(t) :: any
Gets the selected value of the element.
For Checkboxes and Radio buttons it returns the selected option.
Specs
selected?(t) :: boolean
Checks if the node has been selected. Alias for checked?(node)