appium.options.android.UiAutomator2Options#
- class UiAutomator2Options#
- __init__() None#
Methods
__init__()as_w3c(capabilities)Formats given capabilities to a valid W3C session request object
enable_mobile([android_package, ...])Enables mobile browser use for browsers that support it.
get_capability(name)Fetches capability value or None if the capability is not set
ignore_local_proxy_environment_variables()Ignore HTTP_PROXY and HTTPS_PROXY environment variables.
load_capabilities(caps)Sets multiple capabilities
set_capability(name, value)Sets a capability.
to_capabilities()Convert options into capabilities dictionary.
to_w3c()Formats the instance to a valid W3C session request object
Attributes
W3C_CAPABILITY_NAMESadb_exec_timeoutMaximum time to wait until single ADB command is executed.
adb_portNumber of the port where ADB is running.
allow_delay_adbWhether to prevent the emulator to use -delay-adb feature.
allow_test_packagesWhether it is possible to use packages built with the test flag for the automated testing (literally adds -t flag to the adb install command).
android_install_timeoutMaximum amount of time to wait until the application under test is installed.
appString representing app location.
app_activityName of the main app activity.
app_packageApp package identifier.
app_wait_activityName of the app activity to wait for.
app_wait_durationIdentifier of the app package to wait for.
app_wait_for_launchWhether to block until the app under test returns the control to the caller after its activity has been started by Activity Manager.
app_wait_packageIdentifier of the app package to wait for.
auto_grant_permissionsWhether to grant all the requested application permissions automatically when a test starts.
auto_web_viewWhether the driver should try to automatically switch to a web view context after the session is started.
auto_webview_timeoutSet the maximum timeout to wait until a web view is available if autoWebview capability is set to true.
automation_nameString representing the name of the automation engine name.
avdName of Android emulator to run the test on.
avd_argsEmulator command line arguments.
avd_envMapping of emulator environment variables.
avd_launch_timeoutTimeout to wait until Android Emulator is started.
avd_ready_timeoutTimeout to wait until Android Emulator is fully booted and is ready for usage.
browser_nameThe name of the browser to run the test on.
build_tools_versionVersion of Android build tools to use.
capabilitieschrome_logging_prefsChrome logging preferences.
chrome_optionsChrome options.
chromedriver_argsArray of chromedriver CLI arguments.
chromedriver_chrome_mapping_fileFull path to the chromedrivers mapping file is located.
chromedriver_disable_build_checkWhether to disable the compatibility validation between the current chromedriver and the destination browser/web view.
chromedriver_executablePath to the chromedriver executable on the server file system.
chromedriver_executable_dirFull path to the folder where chromedriver executables are located.
chromedriver_portLocal port number to use for Chromedriver communication.
chromedriver_portsLocal port numbers to use for Chromedriver communication.
chromedriver_use_system_executableWhether to use the system chromedriver.
clear_device_logs_on_startMakes the driver to delete all the existing logs in the device buffer before starting a new test.
clear_system_filesWhether the driver should delete generated files at the end of a session.
default_capabilitiesReturn minimal capabilities necessary as a dictionary.
device_nameThe name of the device.
disable_suppress_accessibility_serviceWhether to suppress accessibility services.
disable_window_animationWhether window animations when starting the instrumentation process are disabled.
enable_performance_loggingWhether to enable additional performance logging.
enforce_app_installWhether the application under test is always reinstalled even if a newer version of it already exists on the device under test.
ensure_webviews_have_pagesWhether to ensure if web views have pages.
event_timingsWhether the driver should to report the timings for various Appium-internal events.
extract_chrome_android_package_from_context_nameWhether to use the android package identifier associated with the context name.
full_resetWhether the driver should perform a full reset.
gps_enabledState of the GPS service on emulator.
ignore_hidden_api_policy_errorWhether to ignore a failure while changing hidden API access policies.
intent_actionIntent action to be applied when starting the given appActivity by Activity Manager.
intent_categoryIntent category to be applied when starting the given appActivity by Activity Manager.
intent_flagsIntent flags to be applied when starting the given appActivity by Activity Manager.
is_headlessWhether the driver should start emulator/simulator in headless mode.
key_aliasKeystore key alias.
key_passwordKeystore key password.
keystore_passwordKeystore password.
keystore_pathThe path to keystore.
languageLanguage abbreviation to use in a test session.
localeLocale abbreviation to use in a test session.
locale_scriptCanonical name of the locale to be set for the app under test.
logcat_filter_specsLogcat filter format.
logcat_formatLog print format.
mjpeg_screenshot_urlURL of a service that provides realtime device screenshots in MJPEG format.
mjpeg_server_portNumber of the port UiAutomator2 server starts the MJPEG server on.
mock_location_appIdentifier of the app, which is used as a system mock location provider.
native_web_screenshotWhether to use native screenshots in web view context.
network_speedDesired network speed limit for the emulator.
new_command_timeoutThe allowed time before seeing a new server command.
no_resetWhether the driver should not perform a reset.
no_signWhether to skip application signing.
optional_intent_argumentsIntent arguments to be applied when starting the given appActivity by Activity Manager.
orientationThe orientation of the device's screen.
other_appsLocations of apps to install before running a test.
platform_versionThe platform version of an emulator or a real device.
print_page_source_on_find_failureWhether the driver should print the page source to the log if a find failure occurs.
recreate_chrome_driver_sessionsWhether chromedriver sessions should be killed and then recreated instead of just suspending it on context switch.
remote_adb_hostAddress of the host where ADB is running.
remote_apps_cache_limitMaximum amount of apps that could be cached on the remote device.
show_chromedriver_logWhether to forward chromedriver output to the Appium server log.
skip_device_initializationWhether initial device startup checks by the server are disabled.
skip_log_captureWhether the driver should not record device logs.
skip_logcat_captureWhether to delete all the existing logs in the device buffer before starting a new test.
skip_server_installationWhether to skip the server components installation on the device under test and all the related checks.
skip_unlockWhether to skip the check for lock screen presence.
suppress_kill_serverPrevents the driver from ever killing the ADB server explicitly.
system_portThe number of the port for the internal server to listen on.
udidThe unique identifier of the device under test.
uiautomator2_server_install_timeoutMaximum timeout to wait until UiAutomator2 server is installed on the device.
uiautomator2_server_launch_timeoutMaximum timeout to wait until UiAutomator2 server is listening on the device.
uiautomator2_server_read_timeoutMaximum timeout to wait for an HTTP response from UiAutomator2Server.
uninstall_other_packagesIdentifiers of packages to be uninstalled from the device before a test starts.
unlock_keyUnlock key.
unlock_strategyUnlock strategy name.
unlock_success_timeoutTimeout to wait until the device is unlocked.
unlock_typeUnlock type.
use_keystoreWhether to use custom keystore.
user_profileInteger identifier of a user profile.
webview_devtools_portLocal port number to use for devtools communication.
browser_versionGets and Sets the version of the browser.
platform_nameGets and Sets name of the platform.
accept_insecure_certsGets and Set whether the session accepts insecure certificates.
strict_file_interactabilityGets and Sets whether session is about file interactability.
set_window_rectGets and Sets window size and position.
enable_bidiGets and Set whether the session has WebDriverBiDi enabled.
page_load_strategyGets and Sets page load strategy, the default is "normal".
unhandled_prompt_behaviorGets and Sets unhandled prompt behavior, the default is "dismiss and notify".
timeoutsGets and Sets implicit timeout, pageLoad timeout and script timeout if set (in milliseconds).
proxySets and Gets Proxy.
enable_downloadsGets and Sets whether session can download files.
web_socket_urlGets and Sets WebSocket URL.