FirefoxDriver.Commands.WebDriver.Element Class
Element related WebDriver endpoints see JsonWireProtocol
Item Index
Methods
active
-
sessionId
-
elementId
Get the element on the page that currently has focus. The element will be returned as a WebElement JSON object.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
attribute
-
sessionId
-
elementId
-
attr
Get the value of an element's attribute.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
-
attr
GETAttribute that should be fetched
childElement
-
sessionId
-
elementId
-
using
-
value
Search for an element on the page, starting from the identified element. The located element will be returned as a WebElement JSON object. The table below lists the locator strategies that each server should support. Each locator must return the first matching element located in the DOM.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
-
using
POSTThe locator strategy to use. // Not yet supported
-
value
POSTThe The search target.
childElements
-
sessionId
-
elementId
-
using
-
value
Search for multiple elements on the page, starting from the identified 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:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
-
using
POSTThe locator strategy to use. // Not yet supported
-
value
POSTThe The search target.
clear
-
sessionId
-
elementId
Clear a TEXTAREA or text INPUT element's value
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
click
-
sessionId
-
elementId
Click on an element.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
cssProperty
-
sessionId
-
elementId
-
propertyName
Query the value of an element's computed CSS property. The CSS property to query should be specified using the CSS property name, not the JavaScript property name (e.g. background-color instead of backgroundColor).
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
-
propertyName
GETName of the css property to fetch
displayed
-
sessionId
-
elementId
Determine an element's location on the page. The point (0, 0) refers to the upper-left corner of the page. The element's coordinates are returned as a JSON object with x and y properties.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
element
-
sessionId
-
using
-
value
Search for an element on the page, starting from the document root. The located element will be returned as a WebElement JSON object.
Parameters:
-
sessionId
GETID of the session to route the command to
-
using
POSTThe locator strategy to use. // Not yet supported
-
value
POSTThe The search target.
elementInfo
-
sessionId
-
elementId
Get the element on the page that currently has focus. The element will be returned as a WebElement JSON object.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
elements
-
sessionId
-
using
-
value
Search for multiple elements on the page, starting from the document root. The located element will be returned as a WebElement JSON object.
Parameters:
-
sessionId
GETID of the session to route the command to
-
using
POSTThe locator strategy to use. // Not yet supported
-
value
POSTThe The search target.
enabled
-
sessionId
-
elementId
Determine if an element is currently enabled
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
equals
-
sessionId
-
elementId
-
other
Test if two element IDs refer to the same DOM element
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
-
other
GETID of the element to compare
keys
-
sessionId
-
value
Send a sequence of key strokes to the active element. This command is similar to the send keys command in every aspect except the implicit termination: The modifiers are not released at the end of the call. Rather, the state of the modifier keys is kept between calls, so mouse interactions can be performed while modifier keys are depressed.
Parameters:
-
sessionId
GETID of the session to route the command to
-
value
POSTThe keys sequence to be sent
location
-
sessionId
-
elementId
Determine an element's location on the page. The point (0, 0) refers to the upper-left corner of the page. The element's coordinates are returned as a JSON object with x and y properties.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
locationInView
-
sessionId
-
elementId
Determine an element's location on the screen once it has been scrolled into view. Note: This is considered an internal command and should only be used to determine an element's location for correctly generating native events.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
multiElementResponse
-
req
-
res
Generic multi elements response handler
Parameters:
-
req
ObjectOriginal request
-
res
ObjectOriginal response
parseElement
-
element
Parses an element return value
Parameters:
-
element
ObjectMarionette return value of an element call
Returns:
Webdriver compatible element response
parseElements
-
element
Parses multi elements return value
Parameters:
-
element
ObjectMarionette return value of an elements call
Returns:
Webdriver compatible elements response
selected
-
sessionId
-
elementId
Determine if an OPTION element, or an INPUT element of type checkbox or radiobutton is currently selected
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
singleElementResponse
-
req
-
res
Generic single element response handler
Parameters:
-
req
ObjectOriginal request
-
res
ObjectOriginal response
size
-
sessionId
-
elementId
Determine an element's size in pixels. The size will be returned as a JSON object with width and height properties.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
submit
-
sessionId
-
elementId
Submit a FORM element. The submit command may also be applied to any element that is a descendant of a FORM element.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
tagName
-
sessionId
-
elementId
Query for an element's tag name
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
text
-
sessionId
-
elementId
Returns the visible text for the element.
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
value
-
sessionId
-
elementId
-
value
Clears the contents of an element
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
-
value
POSTThe keys sequence to be sent
value
-
sessionId
-
elementId
-
value
Send a sequence of key strokes to an element
Parameters:
-
sessionId
GETID of the session to route the command to
-
elementId
GETID of the element to route the command to
-
value
POSTThe keys sequence to be sent