Marionette.Element Class
Creates an element reference based on an id and a client instance. You should never need to manually create an instance of element.
Use findElement or findElements to create instance(s) of this class.
Item Index
Methods
_sendCommand
-
command
-
responseKey
-
callback
Sends remote command processes the result. Appends element id to each command.
Parameters:
Returns:
self.
clear
-
callback
Clears element.
Parameters:
-
callback
Functionvalue of element.
Returns:
self.
click
-
callback
Clicks element.
Parameters:
-
callback
Functionboolean result.
Returns:
self.
cssProperty
-
property
-
callback
Returns the value of the specified CSS property name.
Returns:
self.
displayed
-
callback
Checks if element is displayed.
Parameters:
-
callback
Functionboolean argument.
Returns:
self.
enabled
-
callback
Checks if element is enabled.
Parameters:
-
callback
Functionboolean argument.
Returns:
self.
equals
-
element
Checks to see if two elements are equal
Parameters:
-
element
Marionette.Elementelement to test.
Returns:
true when equal.
findElement
-
query
-
method
-
callback
Finds a single child of this element.
Parameters:
Returns:
self.
findElements
-
query
-
method
-
callback
Finds a all children of this element that match a pattern.
Parameters:
Returns:
elements matched the query string.
getAttribute
-
attr
-
callback
Gets attribute value for element.
Returns:
the value of the Attribute.
location
-
callback
Returns the dictionary with x and y location of an element.
The returned location will be in the following format:
// returned in callback or result of this call in the sync driver. { x: Number, y: Number }
Parameters:
-
callback
Function[Error err, Object location].
Returns:
self.
rect
-
callback
Returns the object with: x and y location of the element height and width of the element
Parameters:
-
callback
Function[Error err, Object rect]
Returns:
self.
scriptWith
-
script
-
[args]
-
callback
Shortcut method to execute a function with this element as first argument.
Parameters:
selected
-
callback
Checks if element is selected.
Parameters:
-
callback
Functionboolean argument.
Returns:
self.
size
-
callback
Returns the size of a given element.
The returned size will be in the following format:
// returned in callback or result of this call in the sync driver. { x: Number, y: Number }
Parameters:
-
callback
Function[Error err, Object size].
Returns:
self.
tagName
-
callback
Returns tag name of element.
Parameters:
-
callback
Functionnode style [err, tagName].
Returns:
tag name of element.