App Model API
pymordialdroid.android_app
Android application model with package lifecycle and ready state detection.
AndroidApp
Bases: PymordialApp
Represents an Android application with lifecycle management.
The controller reference is automatically attached when registered with a PymordialController instance via controller.add_app(...).
Attributes:
| Name | Type | Description |
|---|---|---|
app_name |
The display name of the application. |
|
package_name |
str
|
The Android package name (e.g. 'com.example.app'). |
screens |
str
|
Dictionary mapping screen names to PymordialScreen instances. |
ready_element |
str
|
Optional UI element indicating the app has fully loaded. |
Source code in .venv/lib/python3.13/site-packages/pymordialdroid/android_app.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | |
check_ready(max_tries=None)
Checks if the ready_element is visible and transitions to READY state.
Source code in .venv/lib/python3.13/site-packages/pymordialdroid/android_app.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
is_open()
Checks if the app is in the READY state.
Source code in .venv/lib/python3.13/site-packages/pymordialdroid/android_app.py
66 67 68 | |
is_loading()
Checks if the app is in the LOADING state.
Source code in .venv/lib/python3.13/site-packages/pymordialdroid/android_app.py
70 71 72 | |
is_closed()
Checks if the app is in the CLOSED state.
Source code in .venv/lib/python3.13/site-packages/pymordialdroid/android_app.py
74 75 76 | |
open(timeout=60, wait_time=10)
Launches the application via the controller.
Source code in .venv/lib/python3.13/site-packages/pymordialdroid/android_app.py
78 79 80 81 82 83 84 85 86 87 88 | |
close(timeout=30, wait_time=2)
Closes the application via the controller.
Source code in .venv/lib/python3.13/site-packages/pymordialdroid/android_app.py
90 91 92 93 94 95 96 97 98 99 | |
is_running()
Checks if the application is currently running on the device.
Source code in .venv/lib/python3.13/site-packages/pymordialdroid/android_app.py
101 102 103 104 105 106 107 108 109 | |