WebDriverPageLoaderElement class
Implements PageLoaderElement for WebDriver test environments.
Internally, this operates using lazy semantics, resolving the underlying
sync_wd.WebElement
s only when some DOM interaction is requested. Resolved
elements are cached until WebDriver indicates they are stale, at which point
an attempt to re-resolve the element(s) is made.
- Implemented types
Constructors
- WebDriverPageLoaderElement(WebDriver _driver)
- Constructs an element without context. Corresponds to the global context, i.e. the root HTML node.
- WebDriverPageLoaderElement.createFromElement(WebElement element)
-
Constructs an element from a
WebElement
.
Properties
- attributes → PageLoaderAttributes
-
Attributes associated with this element.
no setteroverride
-
classes
→ List<
String> -
CSS classes associated with this element.
no setteroverride
- computedStyle → PageLoaderAttributes
-
CSS properties of this element after applying the active stylesheets and
resolving any basic computation, such as converting a percentage into an
absolute length.
no setteroverride
- context → SearchContext
-
The context of this PageLoaderElement. This should only be used if
this API does not provide desired functionality; otherwise usage should
be avoided.
no setteroverride
- contextSync → SearchContext
-
Needed to power mouse actions.
no setteroverride
- displayed → bool
-
Whether this element is displayed based on "display" style.
no setteroverride
- driver → WebDriver
-
no setter
-
elements
→ List<
WebElement> -
Returns all elements resolved.
no setter
- exists → bool
-
Whether this element exists on the page.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique ID to identify the element.
no setteroverride
- innerText → String
-
The inner content of this element.
no setteroverride
- isFocused → bool
-
Whether this element is focused.
no setteroverride
-
listeners
→ List<
PageLoaderListener> -
Gets registered listeners.
no setteroverride
- name → String
-
The tag name of the node represented by this element.
no setteroverride
-
offset
→ Rectangle<
num> -
The offset of this element relative to its parent.
no setteroverride
- properties → PageLoaderAttributes
-
Attributes associated with this element.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seleniumAttributes → PageLoaderAttributes
-
Attributes associated with this element.
no setteroverride
- shadowRoot → WebDriverPageLoaderElement
-
The shadow root hosted by this element.
no setteroverride
-
shadowRootChildren
→ List<
PageLoaderElement> -
The children of the shadow root hosted by this element.
no setteroverride
- style → PageLoaderAttributes
-
This element's inline style attributes.
no setteroverride
- utils → WebDriverPageUtils
-
Returns an instance of PageUtils.
no setteroverride
- visibleText → String
-
Visible text within this element.
no setteroverride
Methods
-
addCheckers(
List< Checker> checkers) → void -
Adds additional Checkers to the list already maintained by the element.
override
-
addListeners(
List< PageLoaderListener> x) → void -
Adds listeners to element.
override
-
blur(
) → Future< Null> -
Blurs the element (= lose focus).
override
-
byTag(
String tagName) → WebDriverPageLoaderElement -
Finds PageLoaderElement from this source by
tag
.override -
clear(
{bool focusBefore = true, bool blurAfter = true}) → Future< Null> -
WebDriver
clear
spec always performs a focus event and a blur event, which contradict with Pageloaderclear
API. Instead of using theclear
API, we send a CTRL-A, then Backspace key and an empty string.override -
click(
{ClickOption? clickOption}) → Future< Null> -
Clicks on the element with
clickOption
.clickOption
is only used for HTML.override -
clickOutside(
) → Future< void> -
Clicks outside of the current element.
override
-
createElement(
Finder finder, List< Filter> filters, List<Checker> checkers) → WebDriverPageLoaderElement -
Creates a new element, using the current element as the parent context
for the newly created element.
override
-
createIterable(
Finder finder, List< Filter> filters, List<Checker> checkers) → WebDriverPageElementIterable -
Creates a new iterable, using the current element as the parent context
for the newly created iterable.
override
-
createList(
Finder finder, List< Filter> filter, List<Checker> checkers) → List<PageLoaderElement> -
Create a new list using the current element as the parent context.
override
-
dispatchCustomEvent(
String name, {Object? detail}) → Future< void> -
Dispatches the
eventName
custom event on this element.override -
focus(
) → Future< Null> -
Focuses the element.
override
-
getBoundingClientRect(
) → Rectangle< num> -
The smallest bounding rectangle that encompasses this element's padding,
scrollbar, and border.
override
-
getElementsByCss(
String selector) → List< WebDriverPageLoaderElement> -
Returns the elements within this element that match the given CSS
selector.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scroll(
{int? x, int? y}) → Future< void> -
Scrolls this element in x and/or y direction by pixels.
override
-
scrollIntoView(
) → Future< void> -
Scrolls this element into view.
override
-
scrollIntoViewCentered(
) → Future< void> -
testCreatorGetters(
) → String -
Gives all getters that can be used by Test Creator.
override
-
testCreatorMethods(
) → String -
Gives all unannotated methods that can be used by Test Creator.
override
-
toString(
) → String -
A string representation of this object.
override
-
toStringDeep(
) → String -
Gives a full description of the element for debugger.
override
-
type(
String keys, {bool focusBefore = true, bool blurAfter = true}) → Future< Null> -
Types
keys
into this element, if possible (e.g. for an input element).override -
typeSequence(
PageLoaderKeyboard keys) → Future< void> -
'typeSequence' for Webdriver does not allow custom combination of
'keydown'/'keypress'/'keyup' events. Instead, all three are automatically
sent in order for each keyboard button.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited