Tester
Class that programmatically interacts with page controls and the test environment.
Inherits: Service
Methods
drag- Drag from the center of the given control by the provided offset.drag_from- Drag from the given start offset by the provided offset delta.enter_text- Give the text input control specified byfinderthe focus and replace its content withtext, as if it had been provided by the onscreen keyboard.find_by_icon- Finds controls by an icon.find_by_key- Finds controls by aKeyinstance or key name.find_by_text- Finds controls containing string equal to thetextargument.find_by_text_containing- Finds controls containing specified text pattern.find_by_tooltip- Finds controls by a tooltip.long_press- Dispatch a pointer down / pointer up sequence (with a delay of 600 ms between the two events) at the center of the given control, assuming it is exposed.mouse_click- Dispatch a primary mouse click at the center of the given control.mouse_click_at- Dispatch a primary mouse click at the given offset.mouse_double_click- Dispatch a primary mouse double click at the center of the given control.mouse_double_click_at- Dispatch a primary mouse double click at the given offset.mouse_hover- Dispatch a pointer hover event at the center of the given control.pump- Triggers a frame after duration amount of time.pump_and_settle- Repeatedly calls pump until there are no longer any frames scheduled.right_mouse_click- Dispatch a secondary mouse click at the center of the given control.right_mouse_click_at- Dispatch a secondary mouse click at the given offset.take_screenshot- Takes a screenshot of the entire application window.tap- Dispatch a pointer down / pointer up sequence at the center of the given control, assuming it is exposed.tap_at- Dispatch a pointer down / pointer up sequence at the given offset.teardown- Teardown Flutter integration test and exit Flutter process.
Methods
dragasync
Drag from the center of the given control by the provided offset.
drag_fromasync
Drag from the given start offset by the provided offset delta.
enter_textasync
enter_text(finder: Finder, text: str)Give the text input control specified by finder the focus and replace its content with text, as if it had been provided by the onscreen keyboard.
Parameters:
- finder (Finder) - Finder to search for a control.
- text (str) - The text to enter.