WebElement class

WebDriver representation and interactions with an HTML element.

Implemented types

Constructors

WebElement(WebDriver driver, SyncRequestClient _client, WebDriverHandler _handler, String id, [SearchContext context, dynamic locator, int index])

Properties

asyncContext SearchContext
Produces a compatible async_core.SearchContext. Allows backwards compatibility with other frameworks.
read-only, override
asyncElement WebElement
Produces a compatible async_core.WebElement. Allows backwards compatibility with other frameworks.
read-only
attributes Attributes
Access to the HTML attributes of this tag.
read-only
context SearchContext
The context from which this element was found.
final
cssProperties Attributes
Access to the cssProperties of this element.
read-only
displayed bool
Is this element visible in the page?
read-only
driver WebDriver
final
enabled bool
Is this form element enabled?
read-only
hashCode int
The hash code for this object. [...]
read-only, override
id String
final
index int
The index of this element in the set of element founds. If the method used to find this element always returns one element, then this is null.
final
location Point<num>
The location of the element. [...]
read-only
locator → dynamic
How the element was located from the context.
final
name String
The tag name for this element.
read-only
properties Attributes
Access to the HTML properties of this tag.
read-only
rect Rectangle<int>
The bounds of this element.
read-only
selected bool
Is this radio button/checkbox selected?
read-only
size Rectangle<int>
The size of this element.
read-only
text String
Visible text within this element.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clear() → void
Clear the content of a text element.
click() → void
Click on this element.
equals(WebElement other) bool
Are these two elements the same underlying element in the DOM.
findElement(By by) WebElement
Find an element nested within this element. [...]
override
findElements(By by) List<WebElement>
Find multiple elements nested within this element.
override
sendKeys(String keysToSend) → void
Send keysToSend to this element.
toString() String
Returns a string representation of this object.
override
toStringDeep() String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, String>
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
override