Elements
Last updated
Was this helpful?
Last updated
Was this helpful?
Search for an element on the page, starting from the document root.
PARAMETERS
strategy
: - Strategy for emelent lookup
selector
: string - Selector string
RETURNS
Promise<>
EXAMPLES
SEE ALSO
Search for multiple elements on the page, starting from the document root. The located elements will be returned as a WebElement JSON objects. The table below lists the locator strategies that each server should support. Elements should be returned in the order located in the DOM.
PARAMETERS
strategy
: - Strategy for emelent lookup
selector
: string - Selector string
RETURNS
EXAMPLES
SEE ALSO
Get the element on the page that currently has focus.
RETURNS
EXAMPLES
SEE ALSO
This object represents a WebDriver element.
SEE ALSO
Search for an element on the page, starting from the referenced web element.
PARAMETERS
selector
: string - Selector string
RETURNS
EXAMPLES
SEE ALSO
Search for multiple elements on the page, starting from the referenced web element. The located elements will be returned as a WebElement JSON objects. The table below lists the locator strategies that each server should support. Elements should be returned in the order located in the DOM.
PARAMETERS
selector
: string - Selector string
RETURNS
EXAMPLES
SEE ALSO
Determines if the referenced element is selected or not. This operation only makes sense on input elements of the Checkbox- and Radio Button states, or on option elements.
RETURNS
Promise<boolean>
EXAMPLES
SEE ALSO
Returns the attribute value of the referenced web element.
PARAMETERS
attributeName
: string - Element attribute name
RETURNS
Promise<string>
EXAMPLES
SEE ALSO
Returns the property of the referenced web element.
PARAMETERS
propertyName
: string - Element property name
RETURNS
Promise<string>
EXAMPLES
SEE ALSO
Returns the computed value of the given CSS property for the element.
PARAMETERS
propertyName
: string - Name of CSS property
RETURNS
Promise<string>
EXAMPLES
SEE ALSO
Returns the visible text for the element.
RETURNS
Promise<string>
EXAMPLES
SEE ALSO
Returns the tagName of a Element
RETURNS
Promise<string>
EXAMPLES
SEE ALSO
Returns the dimensions and coordinates of the referenced element
RETURNS
EXAMPLES
SEE ALSO
Determines if the referenced element is enabled or not.
RETURNS
Promise<boolean>
EXAMPLES
SEE ALSO
Click on an element.
RETURNS
Promise<void>
EXAMPLES
SEE ALSO
Clear content of an element.
RETURNS
Promise<void>
EXAMPLES
SEE ALSO
Send a sequence of key strokes to an element.
PARAMETERS
text
: string - Input text to be typed in element
RETURNS
Promise<void>
EXAMPLES
SEE ALSO
Strategy for searching element on the page
POSSIBLE VALUES
'css selector'
'link text'
'partial link text'
'tag name'
'xpath'
An object defining the Element Rect.
PROPERTIES
x
: number - X axis position of the top-left corner of the element relative to the current browsing context’s document element in CSS pixels
y
: number - Y axis position of the top-left corner of the element relative to the current browsing context’s document element in CSS pixels
width
: number - Height of the element’s bounding rectangle in CSS pixels
height
: number - Width of the web element’s bounding rectangle in CSS pixels
Promise<[]>
Promise<>
strategy
: - Strategy for element lookup
Promise<>
strategy
: - Strategy for emelent lookup
Promise<[]>
Promise<>