UserEvent class abstract UserActions
Test utility methods that provide more advanced simulation of browser interactions than the fireEvent function.
- Annotations
-
- @sealed
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
clear(
Element element) → void -
Selects the text inside
element
and deletes it. -
click(
Element element, {Map eventInit = const {}, bool skipHover = false, int clickCount = 0, bool skipPointerEventsCheck = false}) → void -
Clicks
element
, depending on whatelement
is it can have different side effects. -
dblClick(
Element element, {Map eventInit = const {}, bool skipPointerEventsCheck = false}) → void -
Clicks
element
twice, depending on whatelement
is it can have different side effects. -
deselectOptions(
SelectElement selectElement, List values, {Map clickInit = const {}, bool skipPointerEventsCheck = false}) → void -
Removes the selection for the specified
values
ofselectElement
. -
hover(
Element element, {Map eventInit = const {}, bool skipPointerEventsCheck = false}) → void -
Hovers over
element
. -
keyboard(
String text, {KeyboardState? keyboardState, bool autoModify = false, List< Map> ? keyboardMap}) → KeyboardState -
Simulates the keyboard events described by
text
. -
keyboardWithDelay(
String text, Duration delay, {KeyboardState? keyboardState, bool autoModify = false, List< Map> ? keyboardMap}) → Future<KeyboardState> -
Simulates the keyboard events described by
text
with adelay
between each keystroke. -
paste(
Element element, String text, {Map eventInit = const {}, int? initialSelectionStart, int? initialSelectionEnd}) → void -
Simulates pasting
text
intoelement
. -
selectOptions(
SelectElement selectElement, List values, {Map clickInit = const {}, bool skipPointerEventsCheck = false}) → void -
Selects the specified
values
ofselectElement
. -
tab(
{bool shift = false, Element? focusTrap}) → void - Fires a tab event changing the document.activeElement in the same way the browser does.
-
type(
Element element, String text, {bool skipClick = false, bool skipAutoClose = false, int? initialSelectionStart, int? initialSelectionEnd}) → void -
Writes
text
inside an input or textareaelement
. -
typeWithDelay(
Element element, String text, Duration delay, {bool skipClick = false, bool skipAutoClose = false, dynamic initialSelectionStart, dynamic initialSelectionEnd}) → Future< void> -
Writes
text
inside an input or textareaelement
with adelay
between each character typed. -
unhover(
Element element, {Map eventInit = const {}, bool skipPointerEventsCheck = false}) → void -
Unhovers out of
element
. -
upload(
Element element, List< File> files, {Map clickInit = const {}, Map changeInit = const {}, bool applyAccept = false}) → void -
Uploads
files
toelement
.