HoneyContext class abstract
This class presents a set of methods that can be used by Honey functions to interact with the application under test. It also allows evaluating expressions and accessing the values of variables.
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
- semanticsTree → SemanticsNode
-
The current root semantics node of the accessibility tree.
no setter
- stepOutput → String
-
All the outputs of this context. Resets after each step.
no setter
- testTextInput → TestTextInput
-
The TestTextInput instance that can be used to interact text input.
no setter
Methods
-
click(
{WidgetExpr? widget, Offset? offset, ClickType type = ClickType.single}) → Future< void> -
Click on the given
widget
. Optionally, a clicktype
andoffset
can be provided. -
clone(
{WidgetExpr? referenceWidget}) → HoneyContext - Clone this context. The step output buffer is not cloned.
-
delay(
Duration duration) → Future< void> -
Delay the execution of the current step by the given
duration
. -
deleteVariable(
String name) → void - Delete a variable.
-
dispatchPointerEvent(
PointerEvent e) → void - Send a pointer event to Flutter.
-
dispatchSemanticAction(
SemanticsNode node, SemanticsAction action, [Object? args]) → void -
Perform the given
action
on the givennode
. Ifargs
is provided, it will be passed to the action. -
eval(
Expr? expression) → Future< EvaluatedExpr> -
Evaluate the given
expression
and return the result. -
getVariable(
String name) → EvaluatedExpr - Get a variable by name. If the variable does not exist, an empty value is returned.
-
hasVariable(
String name) → bool - Check if a variable exists.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
output(
String line) → void -
Add the given
line
to the step output buffer. -
setVariable(
String name, EvaluatedExpr expression) → void - Set the content of a variable.
-
swipe(
{WidgetExpr? widget, Offset? offset, Direction direction = Direction.left, double distance = 0.0}) → Future< void> -
Scroll the given
widget
in the givendirection
by the givendistance
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited