Get UiAutomator2 options configured for Android testing with parallel execution support.
(app: Optional[str] = None)
| 20 | |
| 21 | |
| 22 | def make_options(app: Optional[str] = None) -> UiAutomator2Options: |
| 23 | """Get UiAutomator2 options configured for Android testing with parallel execution support.""" |
| 24 | options = UiAutomator2Options() |
| 25 | |
| 26 | # Set basic Android capabilities |
| 27 | options.device_name = android_device_name() |
| 28 | options.platform_name = 'Android' |
| 29 | options.automation_name = 'UIAutomator2' |
| 30 | options.new_command_timeout = 240 |
| 31 | options.uiautomator2_server_install_timeout = 120000 |
| 32 | options.adb_exec_timeout = 120000 |
| 33 | |
| 34 | if app is not None: |
| 35 | options.app = app |
| 36 | |
| 37 | return options |
| 38 | |
| 39 | |
| 40 | def android_device_name() -> str: |