Get XCUITest options configured for iOS testing with parallel execution support.
(app: Optional[str] = None)
| 20 | |
| 21 | |
| 22 | def make_options(app: Optional[str] = None) -> XCUITestOptions: |
| 23 | """Get XCUITest options configured for iOS testing with parallel execution support.""" |
| 24 | options = XCUITestOptions() |
| 25 | |
| 26 | # Set basic iOS capabilities |
| 27 | options.device_name = iphone_device_name() |
| 28 | options.platform_version = os.getenv('IOS_VERSION') or '17.4' |
| 29 | options.allow_touch_id_enroll = True |
| 30 | options.wda_local_port = get_wda_port() |
| 31 | options.simple_is_visible_check = True |
| 32 | |
| 33 | if app is not None: |
| 34 | options.app = app |
| 35 | |
| 36 | if local_prebuilt_wda := os.getenv('LOCAL_PREBUILT_WDA'): |
| 37 | options.use_preinstalled_wda = True |
| 38 | options.prebuilt_wda_path = local_prebuilt_wda |
| 39 | |
| 40 | return options |
| 41 | |
| 42 | |
| 43 | def iphone_device_name() -> str: |