HoneyContext class Null safety

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

HoneyContext()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
semanticsTree SemanticsNode
The current root semantics node of the accessibility tree.
read-only
stepOutput String
All the outputs of this context. Resets after each step.
read-only
testTextInput TestTextInput
The TestTextInput instance that can be used to interact text input.
read-only

Methods

click({WidgetExpr? widget, Offset? offset, ClickType type = ClickType.single}) Future<void>
Click on the given widget. Optionally, a click type and offset 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 given node. If args 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 non-existent 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 given direction by the given distance.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited