webdriver.extensions.
flutter_integration package
Submodules
webdriver.extensions.flutter_integration.flutter_commands
module
class FlutterCommand(driver: WebDriver)
Bases: object
activate_injected_image(image_id: str)→ None
Ac vates an injected image with image ID.
Parameters: image_id (str) – The ID of the injected image to ac vate.
Return type: None
execute_flutter_command(scriptName: str, params: dict)→ Any
Executes a Flu er command by sending a script and parameters to the flu er integra on
driver.
Parameters: scriptName (str) – The name of the Flu er command to execute. This will
be prefixed with ‘flu er:’ when passed to the driver.
params (dict) – A dic onary of parameters to be passed along with the
Flu er command.
Returns: The result of the command execu on. The return value depends on the
specific Flu er command being executed.
Return type: Any
inject_mock_image(value: str)→ str
Injects a mock image to the device. The input can be a file path or a base64-encoded string.
Parameters: value (str) – The file path of the image or a base64-encoded string.
Returns: Image ID of the injected image.
Return type: str
perform_double_click(element: WebElement, offset: Tuple[int, int] | None = None)→ None
Performs a double-click on the given element, with an op onal offset.
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Parameters: element (WebElement) – The element to double-click on. This parameter
is required.
offset (Op onal[Tuple[int, int]]) – The x and y offsets from the element to
click at. If not specified, the click is performed at the element’s center.
Return type: None
perform_drag_and_drop(source: WebElement, target: WebElement)→ None
Performs a drag-and-drop opera on from a source element to a target element.
Parameters: source (WebElement) – The element to drag from.
target (WebElement) – The element to drop onto.
Return type: None
perform_long_press(element: WebElement, offset: Tuple[int, int] | None = None)→ None
Performs a long press on the given element, with an op onal offset.
Parameters: element (WebElement) – The element to perform the long press on. This
parameter is required.
offset (Op onal[Tuple[int, int]]) – The x and y offsets from the element to
perform the long press at. If not specified, the long press is performed at
the element’s center.
Return type: None
scroll_till_visible(scroll_to: Flu erFinder, scroll_direc on: ScrollDirec on = ScrollDirec on.DOWN,
**opts: Any)→ WebElement
Scrolls un l the specified element becomes visible.
Parameters: scroll_to (Flu erFinder) – The Flu er element to scroll to.
scroll_direc on (ScrollDirec on) – The direc on to scroll up or down.
Defaults to ScrollDirec on.DOWN.
KeywordArgs:
scrollView (str): The view of the scroll. Default value is ‘Scrollable’ delta (int): delta for the
scroll. Default value is 64 maxScrolls (int): Max mes to scroll. Default value is 15
se leBetweenScrollsTimeout (float): se le meout in milliseconds. Default value is 5000
dragDura on (float): me gap between each scroll in milliseconds. Default value is 100
Returns: scrolled element
Return type: Webelement
wait_for_invisible(locator: WebElement | Flu erFinder, meout: float | None = None)→ None
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
Waits for a element to become invisible.
Parameters: locator (Union[WebElement, Flu erFinder]) – The element to wait for; can
be a WebElement or a Flu erFinder.
meout (Op onal[float]) – Maximum wait me in seconds. Defaults to a
predefined meout if not specified.
Return type: None
wait_for_visible(locator: WebElement | Flu erFinder, meout: float | None = None)→ None
Waits for a element to become visible.
Parameters: locator (Union[WebElement, Flu erFinder]) – The element to wait for; can
be a WebElement or a Flu erFinder.
meout (Op onal[float]) – Maximum wait me in seconds. Defaults to a
predefined meout if not specified.
Return type: None
webdriver.extensions.flutter_integration.flutter_finder
module
class FlutterFinder(using: Literal['id', 'xpath', 'link text', 'par al link text', 'name', 'tag name', 'class name', 'css
selector', '-ios predicate string', '-ios class chain', '-android uiautomator', '-android viewtag', '-android datamatcher', '-
android viewmatcher', 'accessibility id', '-image', '-custom', '-flu er seman cs label', '-flu er type', '-flu er key', '-flu er
text containing'], value: str)
Bases: object
as_args()→ Tuple[str, str]
sta c by_key(value: str)→ Flu erFinder
sta c by_semantics_label(value: str)→ Flu erFinder
sta c by_text(value: str)→ Flu erFinder
sta c by_text_containing(value: str)→ Flu erFinder
sta c by_type(value: str)→ Flu erFinder
to_dict()→ dict
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF
webdriver.extensions.flutter_integration.scroll_directions
module
class ScrollDirection(value, names=<not given>, *values, module=None, qualname=None, type=None,
start=1, boundary=None)
Bases: Enum
DOWN= 'down'
UP= 'up'
Module contents
Explore our developer-friendly HTML to PDF API Printed using PDFCrowd HTML to PDF