flutter_test_robots

Creator: coderz1093

Last updated:

Add to Cart

Description:

flutter test robots

Simulate human interactions in your tests.


This project is maintainbed by the Flutter Bounty Hunters. Need more capabilities? Fund a milestone today!


Easy keyboard shortcuts #
flutter_test_robots adds methods to WidgetTester for many common keyboard shortcuts.
void main() {
testWidgets("easy shortcuts", (tester) async {
await tester.pressEnter();

await tester.pressShiftEnter();

await tester.pressCmdAltLeftArrow();
});
}
copied to clipboard
Simulate hardware keyboard text input #
flutter_test_robots presses key combos for every character in a given string.
void main() {
testWidgets("type with a hardware keyboard", (tester) async {
// Simulate every key press that's needed to type "Hello, world!".
await tester.typeKeyboardText("Hello, world!");
});
}
copied to clipboard
Simulate IME text input #
flutter_test_robots breaks strings into text editing deltas and sends the deltas through the
standard DeltaTextInputClient API.
void main() {
testWidgets("type with the IME", (tester) async {
// Simulate every IME delta needed to type "Hello, world!".
await tester.ime.typeText("Hello, world!");
});
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.