PlatformAutomatorConfig.fromOptions constructor
PlatformAutomatorConfig.fromOptions({})
Creates a new PlatformAutomatorConfig from individual options.
Implementation
factory PlatformAutomatorConfig.fromOptions({
/// Apps installed on the iOS simulator.
///
/// This is needed for purpose of native view inspection in the Patrol
/// DevTools extension.
String? iosInstalledApps,
/// Time after which the connection with the native automator will fail.
///
/// It must be longer than `findTimeout`.
Duration? connectionTimeout,
/// Time to wait for native views to appear.
Duration? findTimeout,
/// How the keyboard should behave when entering text.
///
/// See [KeyboardBehavior] to learn more.
KeyboardBehavior? keyboardBehavior,
/// Package name of the application under test.
///
/// Android only.
String? packageName,
/// Bundle identifier name of the application under test.
///
/// iOS only.
String? bundleId,
/// Name of the application under test on Android.
String? androidAppName,
/// Name of the application under test on iOS.
String? iosAppName,
/// Called when a native action is performed.
void Function(String)? logger,
}) {
return PlatformAutomatorConfig(
androidConfig: AndroidAutomatorConfig(
packageName: packageName,
appName: androidAppName,
keyboardBehavior: keyboardBehavior,
connectionTimeout: connectionTimeout,
findTimeout: findTimeout,
logger: logger,
),
iosConfig: IOSAutomatorConfig(
iosInstalledApps: iosInstalledApps,
bundleId: bundleId,
appName: iosAppName,
keyboardBehavior: keyboardBehavior,
connectionTimeout: connectionTimeout,
findTimeout: findTimeout,
logger: logger,
),
webConfig: WebAutomatorConfig(logger: logger),
);
}