MCPcopy Index your code
hub / github.com/appium/python-client / make_options

Function make_options

test/functional/flutter_integration/helper/options.py:36–77  ·  view source on GitHub ↗

Get Flutter options configured for testing with parallel execution support.

()

Source from the content-addressed store, hash-verified

34
35
36def make_options() -> FlutterOptions:
37 """Get Flutter options configured for testing with parallel execution support."""
38 options = FlutterOptions()
39
40 # Set Flutter-specific capabilities
41 options.flutter_system_port = get_flutter_system_port()
42 options.flutter_enable_mock_camera = True
43 options.flutter_element_wait_timeout = 10000
44 options.flutter_server_launch_timeout = 120000
45
46 caps: Dict[str, Any] = (
47 {
48 'platformName': 'Android',
49 'deviceName': device_name(),
50 'newCommandTimeout': 120,
51 'uiautomator2ServerInstallTimeout': 120000,
52 'adbExecTimeout': 120000,
53 'app': os.environ['FLUTTER_ANDROID_APP'],
54 'autoGrantPermissions': True,
55 }
56 if is_platform_android()
57 else {
58 'deviceName': device_name(),
59 'platformName': 'iOS',
60 'platformVersion': os.environ['IOS_VERSION'],
61 'allowTouchIdEnroll': True,
62 'wdaLaunchTimeout': 240000,
63 'wdaLocalPort': get_wda_port(),
64 'eventTimings': True,
65 'app': os.environ['FLUTTER_IOS_APP'],
66 }
67 )
68
69 if local_prebuilt_wda := os.getenv('LOCAL_PREBUILT_WDA'):
70 caps.update(
71 {
72 'usePreinstalledWDA': True,
73 'prebuiltWDAPath': local_prebuilt_wda,
74 }
75 )
76
77 return options.load_capabilities(caps)
78
79
80def device_name() -> str:

Callers 1

driverFunction · 0.50

Calls 6

FlutterOptionsClass · 0.90
get_wda_portFunction · 0.90
get_flutter_system_portFunction · 0.85
device_nameFunction · 0.85
is_platform_androidFunction · 0.85
load_capabilitiesMethod · 0.80

Tested by 1

driverFunction · 0.40