Appium-Python-Client 5.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- appium/__init__.py +17 -0
- appium/common/__init__.py +17 -0
- appium/common/exceptions.py +26 -0
- appium/common/helper.py +42 -0
- appium/common/logger.py +28 -0
- appium/options/__init__.py +0 -0
- appium/options/android/__init__.py +2 -0
- appium/options/android/common/__init__.py +0 -0
- appium/options/android/common/adb/__init__.py +0 -0
- appium/options/android/common/adb/adb_exec_timeout_option.py +41 -0
- appium/options/android/common/adb/adb_port_option.py +38 -0
- appium/options/android/common/adb/allow_delay_adb_option.py +39 -0
- appium/options/android/common/adb/build_tools_version_option.py +42 -0
- appium/options/android/common/adb/clear_device_logs_on_start_option.py +40 -0
- appium/options/android/common/adb/ignore_hidden_api_policy_error_option.py +40 -0
- appium/options/android/common/adb/logcat_filter_specs_option.py +42 -0
- appium/options/android/common/adb/logcat_format_option.py +39 -0
- appium/options/android/common/adb/mock_location_app_option.py +42 -0
- appium/options/android/common/adb/remote_adb_host_option.py +39 -0
- appium/options/android/common/adb/skip_logcat_capture_option.py +40 -0
- appium/options/android/common/adb/suppress_kill_server_option.py +39 -0
- appium/options/android/common/app/__init__.py +0 -0
- appium/options/android/common/app/allow_test_packages_option.py +40 -0
- appium/options/android/common/app/android_install_timeout_option.py +43 -0
- appium/options/android/common/app/app_activity_option.py +39 -0
- appium/options/android/common/app/app_package_option.py +39 -0
- appium/options/android/common/app/app_wait_activity_option.py +40 -0
- appium/options/android/common/app/app_wait_duration_option.py +41 -0
- appium/options/android/common/app/app_wait_for_launch_option.py +41 -0
- appium/options/android/common/app/app_wait_package_option.py +40 -0
- appium/options/android/common/app/auto_grant_premissions_option.py +40 -0
- appium/options/android/common/app/enforce_app_install_option.py +40 -0
- appium/options/android/common/app/intent_action_option.py +40 -0
- appium/options/android/common/app/intent_category_option.py +40 -0
- appium/options/android/common/app/intent_flags_option.py +40 -0
- appium/options/android/common/app/optional_intent_arguments_option.py +40 -0
- appium/options/android/common/app/remote_apps_cache_limit_option.py +42 -0
- appium/options/android/common/app/uninstall_other_packages_option.py +39 -0
- appium/options/android/common/avd/__init__.py +0 -0
- appium/options/android/common/avd/avd_args_option.py +38 -0
- appium/options/android/common/avd/avd_env_option.py +38 -0
- appium/options/android/common/avd/avd_launch_timeout_option.py +41 -0
- appium/options/android/common/avd/avd_option.py +41 -0
- appium/options/android/common/avd/avd_ready_timeout_option.py +41 -0
- appium/options/android/common/avd/gps_enabled_option.py +39 -0
- appium/options/android/common/avd/network_speed_option.py +41 -0
- appium/options/android/common/context/__init__.py +0 -0
- appium/options/android/common/context/auto_webview_timeout_option.py +41 -0
- appium/options/android/common/context/chrome_logging_prefs_option.py +41 -0
- appium/options/android/common/context/chrome_options_option.py +40 -0
- appium/options/android/common/context/chromedriver_args_option.py +41 -0
- appium/options/android/common/context/chromedriver_chrome_mapping_file_option.py +43 -0
- appium/options/android/common/context/chromedriver_disable_build_check_option.py +41 -0
- appium/options/android/common/context/chromedriver_executable_dir_option.py +43 -0
- appium/options/android/common/context/chromedriver_executable_option.py +38 -0
- appium/options/android/common/context/chromedriver_port_option.py +39 -0
- appium/options/android/common/context/chromedriver_ports_option.py +39 -0
- appium/options/android/common/context/chromedriver_use_system_executable_option.py +40 -0
- appium/options/android/common/context/ensure_webviews_have_pages_option.py +40 -0
- appium/options/android/common/context/extract_chrome_android_package_from_context_name_option.py +40 -0
- appium/options/android/common/context/native_web_screenshot_option.py +40 -0
- appium/options/android/common/context/recreate_chrome_driver_sessions_option.py +41 -0
- appium/options/android/common/context/show_chromedriver_log_option.py +39 -0
- appium/options/android/common/context/webview_devtools_port_option.py +40 -0
- appium/options/android/common/localization/__init__.py +0 -0
- appium/options/android/common/localization/locale_script_option.py +40 -0
- appium/options/android/common/locking/__init__.py +0 -0
- appium/options/android/common/locking/skip_unlock_option.py +42 -0
- appium/options/android/common/locking/unlock_key_option.py +40 -0
- appium/options/android/common/locking/unlock_strategy_option.py +40 -0
- appium/options/android/common/locking/unlock_success_timeout_option.py +43 -0
- appium/options/android/common/locking/unlock_type_option.py +40 -0
- appium/options/android/common/mjpeg/__init__.py +0 -0
- appium/options/android/common/mjpeg/mjpeg_screenshot_url_option.py +40 -0
- appium/options/android/common/other/__init__.py +0 -0
- appium/options/android/common/other/disable_suppress_accessibility_service_option.py +40 -0
- appium/options/android/common/other/user_profile_option.py +42 -0
- appium/options/android/common/signing/__init__.py +0 -0
- appium/options/android/common/signing/key_alias_option.py +40 -0
- appium/options/android/common/signing/key_password_option.py +40 -0
- appium/options/android/common/signing/keystore_password_option.py +40 -0
- appium/options/android/common/signing/keystore_path_option.py +40 -0
- appium/options/android/common/signing/no_sign_option.py +42 -0
- appium/options/android/common/signing/use_keystore_option.py +42 -0
- appium/options/android/espresso/__init__.py +0 -0
- appium/options/android/espresso/activity_options_option.py +41 -0
- appium/options/android/espresso/app_locale_option.py +44 -0
- appium/options/android/espresso/base.py +221 -0
- appium/options/android/espresso/espresso_build_config_option.py +46 -0
- appium/options/android/espresso/espresso_server_launch_timeout_option.py +43 -0
- appium/options/android/espresso/force_espresso_rebuild_option.py +41 -0
- appium/options/android/espresso/intent_options_option.py +41 -0
- appium/options/android/espresso/show_gradle_log_option.py +39 -0
- appium/options/android/uiautomator2/__init__.py +0 -0
- appium/options/android/uiautomator2/base.py +221 -0
- appium/options/android/uiautomator2/disable_window_animation_option.py +40 -0
- appium/options/android/uiautomator2/mjpeg_server_port_option.py +41 -0
- appium/options/android/uiautomator2/skip_device_initialization_option.py +40 -0
- appium/options/android/uiautomator2/skip_server_installation_option.py +44 -0
- appium/options/android/uiautomator2/uiautomator2_server_install_timeout_option.py +44 -0
- appium/options/android/uiautomator2/uiautomator2_server_launch_timeout_option.py +44 -0
- appium/options/android/uiautomator2/uiautomator2_server_read_timeout_option.py +46 -0
- appium/options/common/__init__.py +1 -0
- appium/options/common/app_option.py +41 -0
- appium/options/common/auto_web_view_option.py +40 -0
- appium/options/common/automation_name_option.py +38 -0
- appium/options/common/base.py +125 -0
- appium/options/common/browser_name_option.py +38 -0
- appium/options/common/bundle_id_option.py +38 -0
- appium/options/common/clear_system_files_option.py +38 -0
- appium/options/common/device_name_option.py +38 -0
- appium/options/common/enable_performance_logging_option.py +38 -0
- appium/options/common/event_timings_option.py +40 -0
- appium/options/common/full_reset_option.py +38 -0
- appium/options/common/is_headless_option.py +39 -0
- appium/options/common/language_option.py +38 -0
- appium/options/common/locale_option.py +38 -0
- appium/options/common/new_command_timeout_option.py +41 -0
- appium/options/common/no_reset_option.py +38 -0
- appium/options/common/orientation_option.py +40 -0
- appium/options/common/other_apps_option.py +39 -0
- appium/options/common/platform_version_option.py +40 -0
- appium/options/common/postrun_option.py +39 -0
- appium/options/common/prerun_option.py +40 -0
- appium/options/common/print_page_source_on_find_failure_option.py +40 -0
- appium/options/common/skip_log_capture_option.py +38 -0
- appium/options/common/supports_capabilities.py +26 -0
- appium/options/common/system_host_option.py +38 -0
- appium/options/common/system_port_option.py +38 -0
- appium/options/common/udid_option.py +38 -0
- appium/options/flutter_integration/__init__.py +15 -0
- appium/options/flutter_integration/base.py +39 -0
- appium/options/flutter_integration/flutter_element_wait_timeout_option.py +50 -0
- appium/options/flutter_integration/flutter_enable_mock_camera_option.py +44 -0
- appium/options/flutter_integration/flutter_server_launch_timeout_option.py +51 -0
- appium/options/flutter_integration/flutter_system_port_option.py +45 -0
- appium/options/gecko/__init__.py +1 -0
- appium/options/gecko/android_storage_option.py +39 -0
- appium/options/gecko/base.py +51 -0
- appium/options/gecko/firefox_options_option.py +38 -0
- appium/options/gecko/marionette_port_option.py +43 -0
- appium/options/gecko/verbosity_option.py +40 -0
- appium/options/ios/__init__.py +2 -0
- appium/options/ios/safari/__init__.py +0 -0
- appium/options/ios/safari/automatic_inspection_option.py +41 -0
- appium/options/ios/safari/automatic_profiling_option.py +41 -0
- appium/options/ios/safari/base.py +51 -0
- appium/options/ios/safari/device_name_option.py +43 -0
- appium/options/ios/safari/device_type_option.py +41 -0
- appium/options/ios/safari/device_udid_option.py +43 -0
- appium/options/ios/safari/platform_build_version_option.py +41 -0
- appium/options/ios/safari/platform_version_option.py +41 -0
- appium/options/ios/safari/use_simulator_option.py +41 -0
- appium/options/ios/safari/webkit_webrtc_option.py +52 -0
- appium/options/ios/xcuitest/__init__.py +0 -0
- appium/options/ios/xcuitest/app/__init__.py +0 -0
- appium/options/ios/xcuitest/app/app_install_strategy_option.py +46 -0
- appium/options/ios/xcuitest/app/app_push_timeout_option.py +42 -0
- appium/options/ios/xcuitest/app/localizable_strings_dir_option.py +39 -0
- appium/options/ios/xcuitest/base.py +223 -0
- appium/options/ios/xcuitest/general/__init__.py +0 -0
- appium/options/ios/xcuitest/general/include_device_caps_to_session_info_option.py +41 -0
- appium/options/ios/xcuitest/general/reset_location_service_option.py +39 -0
- appium/options/ios/xcuitest/other/__init__.py +0 -0
- appium/options/ios/xcuitest/other/command_timeouts_option.py +57 -0
- appium/options/ios/xcuitest/other/launch_with_idb_option.py +42 -0
- appium/options/ios/xcuitest/other/show_ios_log_option.py +39 -0
- appium/options/ios/xcuitest/other/use_json_source_option.py +39 -0
- appium/options/ios/xcuitest/simulator/__init__.py +0 -0
- appium/options/ios/xcuitest/simulator/calendar_access_authorized_option.py +41 -0
- appium/options/ios/xcuitest/simulator/calendar_format_option.py +38 -0
- appium/options/ios/xcuitest/simulator/connect_hardware_keyboard_option.py +43 -0
- appium/options/ios/xcuitest/simulator/custom_ssl_cert_option.py +39 -0
- appium/options/ios/xcuitest/simulator/enforce_fresh_simulator_creation_option.py +39 -0
- appium/options/ios/xcuitest/simulator/force_simulator_software_keyboard_presence_option.py +45 -0
- appium/options/ios/xcuitest/simulator/ios_simulator_logs_predicate_option.py +38 -0
- appium/options/ios/xcuitest/simulator/keep_key_chains_option.py +39 -0
- appium/options/ios/xcuitest/simulator/keychains_exclude_patterns_option.py +44 -0
- appium/options/ios/xcuitest/simulator/permissions_option.py +50 -0
- appium/options/ios/xcuitest/simulator/reduce_motion_option.py +40 -0
- appium/options/ios/xcuitest/simulator/reset_on_session_start_only_option.py +41 -0
- appium/options/ios/xcuitest/simulator/scale_factor_option.py +44 -0
- appium/options/ios/xcuitest/simulator/shutdown_other_simulators_option.py +44 -0
- appium/options/ios/xcuitest/simulator/simulator_devices_set_path_option.py +41 -0
- appium/options/ios/xcuitest/simulator/simulator_pasteboard_automatic_sync_option.py +42 -0
- appium/options/ios/xcuitest/simulator/simulator_startup_timeout_option.py +46 -0
- appium/options/ios/xcuitest/simulator/simulator_trace_pointer_option.py +41 -0
- appium/options/ios/xcuitest/simulator/simulator_window_center_option.py +41 -0
- appium/options/ios/xcuitest/wda/__init__.py +0 -0
- appium/options/ios/xcuitest/wda/allow_provisioning_device_regitration_option.py +40 -0
- appium/options/ios/xcuitest/wda/auto_accept_alerts_option.py +39 -0
- appium/options/ios/xcuitest/wda/auto_disimiss_alerts_option.py +39 -0
- appium/options/ios/xcuitest/wda/derived_data_path_option.py +41 -0
- appium/options/ios/xcuitest/wda/disable_automatic_screenshots_option.py +40 -0
- appium/options/ios/xcuitest/wda/force_app_launch_option.py +42 -0
- appium/options/ios/xcuitest/wda/keychain_password_option.py +39 -0
- appium/options/ios/xcuitest/wda/keychain_path_option.py +39 -0
- appium/options/ios/xcuitest/wda/max_typing_frequency_option.py +40 -0
- appium/options/ios/xcuitest/wda/mjpeg_server_port_option.py +42 -0
- appium/options/ios/xcuitest/wda/process_arguments_option.py +42 -0
- appium/options/ios/xcuitest/wda/result_bundle_path_option.py +42 -0
- appium/options/ios/xcuitest/wda/screenshot_quality_option.py +42 -0
- appium/options/ios/xcuitest/wda/should_terminate_app_option.py +42 -0
- appium/options/ios/xcuitest/wda/should_use_singleton_test_manager_option.py +39 -0
- appium/options/ios/xcuitest/wda/show_xcode_log_option.py +40 -0
- appium/options/ios/xcuitest/wda/simple_is_visible_check_option.py +42 -0
- appium/options/ios/xcuitest/wda/updated_wda_bundle_id_option.py +39 -0
- appium/options/ios/xcuitest/wda/use_native_caching_strategy_option.py +41 -0
- appium/options/ios/xcuitest/wda/use_new_wda_option.py +51 -0
- appium/options/ios/xcuitest/wda/use_prebuilt_wda_option.py +39 -0
- appium/options/ios/xcuitest/wda/use_simple_build_test_option.py +40 -0
- appium/options/ios/xcuitest/wda/use_xctestrun_file_option.py +49 -0
- appium/options/ios/xcuitest/wda/wait_for_idle_timeout_option.py +45 -0
- appium/options/ios/xcuitest/wda/wait_for_quiescence_option.py +42 -0
- appium/options/ios/xcuitest/wda/wda_base_url_option.py +41 -0
- appium/options/ios/xcuitest/wda/wda_connection_timeout_option.py +43 -0
- appium/options/ios/xcuitest/wda/wda_eventloop_idle_delay_option.py +46 -0
- appium/options/ios/xcuitest/wda/wda_launch_timeout_option.py +41 -0
- appium/options/ios/xcuitest/wda/wda_local_port_option.py +41 -0
- appium/options/ios/xcuitest/wda/wda_startup_retries_option.py +39 -0
- appium/options/ios/xcuitest/wda/wda_startup_retry_interval_option.py +43 -0
- appium/options/ios/xcuitest/wda/web_driver_agent_url_option.py +39 -0
- appium/options/ios/xcuitest/wda/xcode_org_id_option.py +39 -0
- appium/options/ios/xcuitest/wda/xcode_signing_id_option.py +39 -0
- appium/options/ios/xcuitest/webview/__init__.py +0 -0
- appium/options/ios/xcuitest/webview/absolute_web_locations_option.py +42 -0
- appium/options/ios/xcuitest/webview/additional_webview_bundle_ids_option.py +40 -0
- appium/options/ios/xcuitest/webview/enable_async_execute_from_https_option.py +39 -0
- appium/options/ios/xcuitest/webview/full_context_list_option.py +42 -0
- appium/options/ios/xcuitest/webview/include_safari_in_webviews_option.py +41 -0
- appium/options/ios/xcuitest/webview/native_web_tap_option.py +40 -0
- appium/options/ios/xcuitest/webview/safari_garbage_collect_option.py +39 -0
- appium/options/ios/xcuitest/webview/safari_ignore_fraud_warning_option.py +39 -0
- appium/options/ios/xcuitest/webview/safari_ignore_web_hostnames_option.py +42 -0
- appium/options/ios/xcuitest/webview/safari_initial_url_option.py +38 -0
- appium/options/ios/xcuitest/webview/safari_log_all_communication_hex_dump_option.py +43 -0
- appium/options/ios/xcuitest/webview/safari_log_all_communication_option.py +40 -0
- appium/options/ios/xcuitest/webview/safari_open_links_in_background_option.py +39 -0
- appium/options/ios/xcuitest/webview/safari_socket_chunk_size_option.py +41 -0
- appium/options/ios/xcuitest/webview/safari_web_inspector_max_frame_length_option.py +41 -0
- appium/options/ios/xcuitest/webview/webkit_response_timeout_option.py +43 -0
- appium/options/ios/xcuitest/webview/webview_connect_retries_option.py +40 -0
- appium/options/ios/xcuitest/webview/webview_connect_timeout_option.py +43 -0
- appium/options/mac/__init__.py +1 -0
- appium/options/mac/mac2/__init__.py +0 -0
- appium/options/mac/mac2/app_path_option.py +39 -0
- appium/options/mac/mac2/arguments_option.py +39 -0
- appium/options/mac/mac2/base.py +113 -0
- appium/options/mac/mac2/bootstrap_root_option.py +41 -0
- appium/options/mac/mac2/environment_option.py +41 -0
- appium/options/mac/mac2/server_startup_timeout_option.py +44 -0
- appium/options/mac/mac2/show_server_logs_option.py +39 -0
- appium/options/mac/mac2/skip_app_kill_option.py +40 -0
- appium/options/mac/mac2/web_driver_agent_mac_url_option.py +39 -0
- appium/options/windows/__init__.py +1 -0
- appium/options/windows/windows/__init__.py +0 -0
- appium/options/windows/windows/app_arguments_option.py +40 -0
- appium/options/windows/windows/app_top_level_window_option.py +40 -0
- appium/options/windows/windows/app_working_dir_option.py +40 -0
- appium/options/windows/windows/base.py +97 -0
- appium/options/windows/windows/create_session_timeout_option.py +45 -0
- appium/options/windows/windows/expreimental_web_driver_option.py +39 -0
- appium/options/windows/windows/wait_for_app_launch_option.py +43 -0
- appium/protocols/__init__.py +13 -0
- appium/protocols/webdriver/__init__.py +13 -0
- appium/protocols/webdriver/can_execute_commands.py +23 -0
- appium/protocols/webdriver/can_execute_scripts.py +27 -0
- appium/protocols/webdriver/can_find_elements.py +32 -0
- appium/protocols/webdriver/can_remember_extension_presence.py +23 -0
- appium/py.typed +0 -0
- appium/version.py +22 -0
- appium/webdriver/__init__.py +20 -0
- appium/webdriver/appium_connection.py +65 -0
- appium/webdriver/appium_service.py +330 -0
- appium/webdriver/applicationstate.py +21 -0
- appium/webdriver/client_config.py +38 -0
- appium/webdriver/clipboard_content_type.py +19 -0
- appium/webdriver/command_method.py +27 -0
- appium/webdriver/common/__init__.py +17 -0
- appium/webdriver/common/appiumby.py +54 -0
- appium/webdriver/connectiontype.py +42 -0
- appium/webdriver/errorhandler.py +125 -0
- appium/webdriver/extensions/__init__.py +13 -0
- appium/webdriver/extensions/action_helpers.py +188 -0
- appium/webdriver/extensions/android/__init__.py +0 -0
- appium/webdriver/extensions/android/activities.py +65 -0
- appium/webdriver/extensions/android/common.py +59 -0
- appium/webdriver/extensions/android/display.py +48 -0
- appium/webdriver/extensions/android/gsm.py +147 -0
- appium/webdriver/extensions/android/nativekey.py +1119 -0
- appium/webdriver/extensions/android/network.py +175 -0
- appium/webdriver/extensions/android/performance.py +85 -0
- appium/webdriver/extensions/android/power.py +80 -0
- appium/webdriver/extensions/android/sms.py +50 -0
- appium/webdriver/extensions/android/system_bars.py +58 -0
- appium/webdriver/extensions/applications.py +274 -0
- appium/webdriver/extensions/clipboard.py +107 -0
- appium/webdriver/extensions/context.py +63 -0
- appium/webdriver/extensions/device_time.py +75 -0
- appium/webdriver/extensions/execute_driver.py +60 -0
- appium/webdriver/extensions/execute_mobile_command.py +62 -0
- appium/webdriver/extensions/flutter_integration/__init__.py +13 -0
- appium/webdriver/extensions/flutter_integration/flutter_commands.py +296 -0
- appium/webdriver/extensions/flutter_integration/flutter_finder.py +55 -0
- appium/webdriver/extensions/flutter_integration/scroll_directions.py +6 -0
- appium/webdriver/extensions/hw_actions.py +149 -0
- appium/webdriver/extensions/images_comparison.py +132 -0
- appium/webdriver/extensions/keyboard.py +168 -0
- appium/webdriver/extensions/location.py +98 -0
- appium/webdriver/extensions/log_event.py +68 -0
- appium/webdriver/extensions/logs.py +53 -0
- appium/webdriver/extensions/remote_fs.py +110 -0
- appium/webdriver/extensions/screen_record.py +207 -0
- appium/webdriver/extensions/session.py +41 -0
- appium/webdriver/extensions/settings.py +49 -0
- appium/webdriver/locator_converter.py +29 -0
- appium/webdriver/mobilecommand.py +104 -0
- appium/webdriver/switch_to.py +35 -0
- appium/webdriver/webdriver.py +495 -0
- appium/webdriver/webelement.py +130 -0
- appium_python_client-5.2.0.dist-info/METADATA +573 -0
- appium_python_client-5.2.0.dist-info/RECORD +324 -0
- appium_python_client-5.2.0.dist-info/WHEEL +4 -0
- appium_python_client-5.2.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from datetime import timedelta
|
|
19
|
+
from typing import Optional, Union
|
|
20
|
+
|
|
21
|
+
from appium.options.common.supports_capabilities import SupportsCapabilities
|
|
22
|
+
|
|
23
|
+
ESPRESSO_SERVER_LAUNCH_TIMEOUT = 'espressoServerLaunchTimeout'
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class EspressoServerLaunchTimeoutOption(SupportsCapabilities):
|
|
27
|
+
@property
|
|
28
|
+
def espresso_server_launch_timeout(self) -> Optional[timedelta]:
|
|
29
|
+
"""
|
|
30
|
+
Maximum timeout to wait until Espresso server is listening on the device.
|
|
31
|
+
"""
|
|
32
|
+
value = self.get_capability(ESPRESSO_SERVER_LAUNCH_TIMEOUT)
|
|
33
|
+
return None if value is None else timedelta(milliseconds=value)
|
|
34
|
+
|
|
35
|
+
@espresso_server_launch_timeout.setter
|
|
36
|
+
def espresso_server_launch_timeout(self, value: Union[timedelta, int]) -> None:
|
|
37
|
+
"""
|
|
38
|
+
Set the maximum timeout to wait util Espresso is listening on the device.
|
|
39
|
+
45000 ms by default
|
|
40
|
+
"""
|
|
41
|
+
self.set_capability(
|
|
42
|
+
ESPRESSO_SERVER_LAUNCH_TIMEOUT, int(value.total_seconds() * 1000) if isinstance(value, timedelta) else value
|
|
43
|
+
)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from typing import Optional
|
|
19
|
+
|
|
20
|
+
from appium.options.common.supports_capabilities import SupportsCapabilities
|
|
21
|
+
|
|
22
|
+
FORCE_ESPRESSO_REBUILD = 'forceEspressoRebuild'
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ForceEspressoRebuildOption(SupportsCapabilities):
|
|
26
|
+
@property
|
|
27
|
+
def force_espresso_rebuild(self) -> Optional[bool]:
|
|
28
|
+
"""
|
|
29
|
+
Whether to force Espresso server rebuild on a new session startup.
|
|
30
|
+
"""
|
|
31
|
+
return self.get_capability(FORCE_ESPRESSO_REBUILD)
|
|
32
|
+
|
|
33
|
+
@force_espresso_rebuild.setter
|
|
34
|
+
def force_espresso_rebuild(self, value: bool) -> None:
|
|
35
|
+
"""
|
|
36
|
+
Whether to always enforce Espresso server rebuild (true).
|
|
37
|
+
By default, Espresso caches the already built server apk and only rebuilds
|
|
38
|
+
it when it is necessary, because rebuilding process needs extra time.
|
|
39
|
+
false by default.
|
|
40
|
+
"""
|
|
41
|
+
self.set_capability(FORCE_ESPRESSO_REBUILD, value)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from typing import Any, Dict, Optional
|
|
19
|
+
|
|
20
|
+
from appium.options.common.supports_capabilities import SupportsCapabilities
|
|
21
|
+
|
|
22
|
+
INTENT_OPTIONS = 'intentOptions'
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class IntentOptionsOption(SupportsCapabilities):
|
|
26
|
+
@property
|
|
27
|
+
def intent_options(self) -> Optional[Dict[str, Any]]:
|
|
28
|
+
"""
|
|
29
|
+
Intent options.
|
|
30
|
+
"""
|
|
31
|
+
return self.get_capability(INTENT_OPTIONS)
|
|
32
|
+
|
|
33
|
+
@intent_options.setter
|
|
34
|
+
def intent_options(self, value: Dict[str, Any]) -> None:
|
|
35
|
+
"""
|
|
36
|
+
The mapping of custom options for the intent that is going to be passed
|
|
37
|
+
to the main app activity. Check
|
|
38
|
+
https://github.com/appium/appium-espresso-driver#intent-options
|
|
39
|
+
for more details.
|
|
40
|
+
"""
|
|
41
|
+
self.set_capability(INTENT_OPTIONS, value)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from typing import Optional
|
|
19
|
+
|
|
20
|
+
from appium.options.common.supports_capabilities import SupportsCapabilities
|
|
21
|
+
|
|
22
|
+
SHOW_GRADLE_LOG = 'showGradleLog'
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class ShowGradleLogOption(SupportsCapabilities):
|
|
26
|
+
@property
|
|
27
|
+
def show_gradle_log(self) -> Optional[bool]:
|
|
28
|
+
"""
|
|
29
|
+
Whether to include Gradle log to the regular server log.
|
|
30
|
+
"""
|
|
31
|
+
return self.get_capability(SHOW_GRADLE_LOG)
|
|
32
|
+
|
|
33
|
+
@show_gradle_log.setter
|
|
34
|
+
def show_gradle_log(self, value: bool) -> None:
|
|
35
|
+
"""
|
|
36
|
+
Whether to include Gradle log to the regular server logs while
|
|
37
|
+
building Espresso server. false by default.
|
|
38
|
+
"""
|
|
39
|
+
self.set_capability(SHOW_GRADLE_LOG, value)
|
|
File without changes
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from typing import Dict
|
|
19
|
+
|
|
20
|
+
from appium.options.android.common.adb.adb_exec_timeout_option import AdbExecTimeoutOption
|
|
21
|
+
from appium.options.android.common.adb.adb_port_option import AdbPortOption
|
|
22
|
+
from appium.options.android.common.adb.allow_delay_adb_option import AllowDelayAdbOption
|
|
23
|
+
from appium.options.android.common.adb.build_tools_version_option import BuildToolsVersionOption
|
|
24
|
+
from appium.options.android.common.adb.clear_device_logs_on_start_option import ClearDeviceLogsOnStartOption
|
|
25
|
+
from appium.options.android.common.adb.ignore_hidden_api_policy_error_option import IgnoreHiddenApiPolicyErrorOption
|
|
26
|
+
from appium.options.android.common.adb.logcat_filter_specs_option import LogcatFilterSpecsOption
|
|
27
|
+
from appium.options.android.common.adb.logcat_format_option import LogcatFormatOption
|
|
28
|
+
from appium.options.android.common.adb.mock_location_app_option import MockLocationAppOption
|
|
29
|
+
from appium.options.android.common.adb.remote_adb_host_option import RemoteAdbHostOption
|
|
30
|
+
from appium.options.android.common.adb.skip_logcat_capture_option import SkipLogcatCaptureOption
|
|
31
|
+
from appium.options.android.common.adb.suppress_kill_server_option import SuppressKillServerOption
|
|
32
|
+
from appium.options.android.common.app.allow_test_packages_option import AllowTestPackagesOption
|
|
33
|
+
from appium.options.android.common.app.android_install_timeout_option import AndroidInstallTimeoutOption
|
|
34
|
+
from appium.options.android.common.app.app_activity_option import AppActivityOption
|
|
35
|
+
from appium.options.android.common.app.app_package_option import AppPackageOption
|
|
36
|
+
from appium.options.android.common.app.app_wait_activity_option import AppWaitActivityOption
|
|
37
|
+
from appium.options.android.common.app.app_wait_duration_option import AppWaitDurationOption
|
|
38
|
+
from appium.options.android.common.app.app_wait_for_launch_option import AppWaitForLaunchOption
|
|
39
|
+
from appium.options.android.common.app.app_wait_package_option import AppWaitPackageOption
|
|
40
|
+
from appium.options.android.common.app.auto_grant_premissions_option import AutoGrantPermissionsOption
|
|
41
|
+
from appium.options.android.common.app.enforce_app_install_option import EnforceAppInstallOption
|
|
42
|
+
from appium.options.android.common.app.intent_action_option import IntentActionOption
|
|
43
|
+
from appium.options.android.common.app.intent_category_option import IntentCategoryOption
|
|
44
|
+
from appium.options.android.common.app.intent_flags_option import IntentFlagsOption
|
|
45
|
+
from appium.options.android.common.app.optional_intent_arguments_option import OptionalIntentArgumentsOption
|
|
46
|
+
from appium.options.android.common.app.remote_apps_cache_limit_option import RemoteAppsCacheLimitOption
|
|
47
|
+
from appium.options.android.common.app.uninstall_other_packages_option import UninstallOtherPackagesOption
|
|
48
|
+
from appium.options.android.common.avd.avd_args_option import AvdArgsOption
|
|
49
|
+
from appium.options.android.common.avd.avd_env_option import AvdEnvOption
|
|
50
|
+
from appium.options.android.common.avd.avd_launch_timeout_option import AvdLaunchTimeoutOption
|
|
51
|
+
from appium.options.android.common.avd.avd_option import AvdOption
|
|
52
|
+
from appium.options.android.common.avd.avd_ready_timeout_option import AvdReadyTimeoutOption
|
|
53
|
+
from appium.options.android.common.avd.gps_enabled_option import GpsEnabledOption
|
|
54
|
+
from appium.options.android.common.avd.network_speed_option import NetworkSpeedOption
|
|
55
|
+
from appium.options.android.common.context.auto_webview_timeout_option import AutoWebviewTimeoutOption
|
|
56
|
+
from appium.options.android.common.context.chrome_logging_prefs_option import ChromeLoggingPrefsOption
|
|
57
|
+
from appium.options.android.common.context.chrome_options_option import ChromeOptionsOption
|
|
58
|
+
from appium.options.android.common.context.chromedriver_args_option import ChromedriverArgsOption
|
|
59
|
+
from appium.options.android.common.context.chromedriver_chrome_mapping_file_option import (
|
|
60
|
+
ChromedriverChromeMappingFileOption,
|
|
61
|
+
)
|
|
62
|
+
from appium.options.android.common.context.chromedriver_disable_build_check_option import (
|
|
63
|
+
ChromedriverDisableBuildCheckOption,
|
|
64
|
+
)
|
|
65
|
+
from appium.options.android.common.context.chromedriver_executable_dir_option import ChromedriverExecutableDirOption
|
|
66
|
+
from appium.options.android.common.context.chromedriver_executable_option import ChromedriverExecutableOption
|
|
67
|
+
from appium.options.android.common.context.chromedriver_port_option import ChromedriverPortOption
|
|
68
|
+
from appium.options.android.common.context.chromedriver_ports_option import ChromedriverPortsOption
|
|
69
|
+
from appium.options.android.common.context.chromedriver_use_system_executable_option import (
|
|
70
|
+
ChromedriverUseSystemExecutableOption,
|
|
71
|
+
)
|
|
72
|
+
from appium.options.android.common.context.ensure_webviews_have_pages_option import EnsureWebviewsHavePagesOption
|
|
73
|
+
from appium.options.android.common.context.extract_chrome_android_package_from_context_name_option import (
|
|
74
|
+
ExtractChromeAndroidPackageFromContextNameOption,
|
|
75
|
+
)
|
|
76
|
+
from appium.options.android.common.context.native_web_screenshot_option import NativeWebScreenshotOption
|
|
77
|
+
from appium.options.android.common.context.recreate_chrome_driver_sessions_option import (
|
|
78
|
+
RecreateChromeDriverSessionsOption,
|
|
79
|
+
)
|
|
80
|
+
from appium.options.android.common.context.show_chromedriver_log_option import ShowChromedriverLogOption
|
|
81
|
+
from appium.options.android.common.context.webview_devtools_port_option import WebviewDevtoolsPortOption
|
|
82
|
+
from appium.options.android.common.localization.locale_script_option import LocaleScriptOption
|
|
83
|
+
from appium.options.android.common.locking.skip_unlock_option import SkipUnlockOption
|
|
84
|
+
from appium.options.android.common.locking.unlock_key_option import UnlockKeyOption
|
|
85
|
+
from appium.options.android.common.locking.unlock_strategy_option import UnlockStrategyOption
|
|
86
|
+
from appium.options.android.common.locking.unlock_success_timeout_option import UnlockSuccessTimeoutOption
|
|
87
|
+
from appium.options.android.common.locking.unlock_type_option import UnlockTypeOption
|
|
88
|
+
from appium.options.android.common.mjpeg.mjpeg_screenshot_url_option import MjpegScreenshotUrlOption
|
|
89
|
+
from appium.options.android.common.other.disable_suppress_accessibility_service_option import (
|
|
90
|
+
DisableSuppressAccessibilityServiceOption,
|
|
91
|
+
)
|
|
92
|
+
from appium.options.android.common.other.user_profile_option import UserProfileOption
|
|
93
|
+
from appium.options.android.common.signing.key_alias_option import KeyAliasOption
|
|
94
|
+
from appium.options.android.common.signing.key_password_option import KeyPasswordOption
|
|
95
|
+
from appium.options.android.common.signing.keystore_password_option import KeystorePasswordOption
|
|
96
|
+
from appium.options.android.common.signing.keystore_path_option import KeystorePathOption
|
|
97
|
+
from appium.options.android.common.signing.no_sign_option import NoSignOption
|
|
98
|
+
from appium.options.android.common.signing.use_keystore_option import UseKeystoreOption
|
|
99
|
+
from appium.options.common.app_option import AppOption
|
|
100
|
+
from appium.options.common.auto_web_view_option import AutoWebViewOption
|
|
101
|
+
from appium.options.common.automation_name_option import AUTOMATION_NAME
|
|
102
|
+
from appium.options.common.base import PLATFORM_NAME, AppiumOptions
|
|
103
|
+
from appium.options.common.clear_system_files_option import ClearSystemFilesOption
|
|
104
|
+
from appium.options.common.device_name_option import DeviceNameOption
|
|
105
|
+
from appium.options.common.enable_performance_logging_option import EnablePerformanceLoggingOption
|
|
106
|
+
from appium.options.common.is_headless_option import IsHeadlessOption
|
|
107
|
+
from appium.options.common.language_option import LanguageOption
|
|
108
|
+
from appium.options.common.locale_option import LocaleOption
|
|
109
|
+
from appium.options.common.orientation_option import OrientationOption
|
|
110
|
+
from appium.options.common.other_apps_option import OtherAppsOption
|
|
111
|
+
from appium.options.common.platform_version_option import PlatformVersionOption
|
|
112
|
+
from appium.options.common.skip_log_capture_option import SkipLogCaptureOption
|
|
113
|
+
from appium.options.common.system_port_option import SystemPortOption
|
|
114
|
+
from appium.options.common.udid_option import UdidOption
|
|
115
|
+
|
|
116
|
+
from .disable_window_animation_option import DisableWindowAnimationOption
|
|
117
|
+
from .mjpeg_server_port_option import MjpegServerPortOption
|
|
118
|
+
from .skip_device_initialization_option import SkipDeviceInitializationOption
|
|
119
|
+
from .skip_server_installation_option import SkipServerInstallationOption
|
|
120
|
+
from .uiautomator2_server_install_timeout_option import Uiautomator2ServerInstallTimeoutOption
|
|
121
|
+
from .uiautomator2_server_launch_timeout_option import Uiautomator2ServerLaunchTimeoutOption
|
|
122
|
+
from .uiautomator2_server_read_timeout_option import Uiautomator2ServerReadTimeoutOption
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
class UiAutomator2Options(
|
|
126
|
+
AppiumOptions,
|
|
127
|
+
AppOption,
|
|
128
|
+
ClearSystemFilesOption,
|
|
129
|
+
OrientationOption,
|
|
130
|
+
UdidOption,
|
|
131
|
+
LanguageOption,
|
|
132
|
+
LocaleOption,
|
|
133
|
+
IsHeadlessOption,
|
|
134
|
+
SkipLogCaptureOption,
|
|
135
|
+
AutoWebViewOption,
|
|
136
|
+
EnablePerformanceLoggingOption,
|
|
137
|
+
OtherAppsOption,
|
|
138
|
+
DeviceNameOption,
|
|
139
|
+
SystemPortOption,
|
|
140
|
+
SkipServerInstallationOption,
|
|
141
|
+
Uiautomator2ServerInstallTimeoutOption,
|
|
142
|
+
Uiautomator2ServerLaunchTimeoutOption,
|
|
143
|
+
Uiautomator2ServerReadTimeoutOption,
|
|
144
|
+
DisableWindowAnimationOption,
|
|
145
|
+
SkipDeviceInitializationOption,
|
|
146
|
+
AppPackageOption,
|
|
147
|
+
AppActivityOption,
|
|
148
|
+
PlatformVersionOption,
|
|
149
|
+
AppWaitActivityOption,
|
|
150
|
+
AppWaitPackageOption,
|
|
151
|
+
AppWaitDurationOption,
|
|
152
|
+
AndroidInstallTimeoutOption,
|
|
153
|
+
AppWaitForLaunchOption,
|
|
154
|
+
IntentCategoryOption,
|
|
155
|
+
IntentActionOption,
|
|
156
|
+
IntentFlagsOption,
|
|
157
|
+
OptionalIntentArgumentsOption,
|
|
158
|
+
AutoGrantPermissionsOption,
|
|
159
|
+
UninstallOtherPackagesOption,
|
|
160
|
+
AllowTestPackagesOption,
|
|
161
|
+
RemoteAppsCacheLimitOption,
|
|
162
|
+
EnforceAppInstallOption,
|
|
163
|
+
LocaleScriptOption,
|
|
164
|
+
AdbPortOption,
|
|
165
|
+
RemoteAdbHostOption,
|
|
166
|
+
AdbExecTimeoutOption,
|
|
167
|
+
ClearDeviceLogsOnStartOption,
|
|
168
|
+
SkipLogcatCaptureOption,
|
|
169
|
+
BuildToolsVersionOption,
|
|
170
|
+
SuppressKillServerOption,
|
|
171
|
+
IgnoreHiddenApiPolicyErrorOption,
|
|
172
|
+
MockLocationAppOption,
|
|
173
|
+
LogcatFormatOption,
|
|
174
|
+
LogcatFilterSpecsOption,
|
|
175
|
+
AllowDelayAdbOption,
|
|
176
|
+
AvdOption,
|
|
177
|
+
AvdLaunchTimeoutOption,
|
|
178
|
+
AvdReadyTimeoutOption,
|
|
179
|
+
AvdArgsOption,
|
|
180
|
+
AvdEnvOption,
|
|
181
|
+
NetworkSpeedOption,
|
|
182
|
+
GpsEnabledOption,
|
|
183
|
+
UseKeystoreOption,
|
|
184
|
+
KeystorePathOption,
|
|
185
|
+
KeystorePasswordOption,
|
|
186
|
+
KeyAliasOption,
|
|
187
|
+
KeyPasswordOption,
|
|
188
|
+
NoSignOption,
|
|
189
|
+
SkipUnlockOption,
|
|
190
|
+
UnlockKeyOption,
|
|
191
|
+
UnlockStrategyOption,
|
|
192
|
+
UnlockSuccessTimeoutOption,
|
|
193
|
+
UnlockTypeOption,
|
|
194
|
+
MjpegServerPortOption,
|
|
195
|
+
MjpegScreenshotUrlOption,
|
|
196
|
+
AutoWebviewTimeoutOption,
|
|
197
|
+
ChromeLoggingPrefsOption,
|
|
198
|
+
ChromeOptionsOption,
|
|
199
|
+
ChromedriverArgsOption,
|
|
200
|
+
ChromedriverChromeMappingFileOption,
|
|
201
|
+
ChromedriverDisableBuildCheckOption,
|
|
202
|
+
ChromedriverExecutableDirOption,
|
|
203
|
+
ChromedriverExecutableOption,
|
|
204
|
+
ChromedriverPortOption,
|
|
205
|
+
ChromedriverPortsOption,
|
|
206
|
+
ChromedriverUseSystemExecutableOption,
|
|
207
|
+
EnsureWebviewsHavePagesOption,
|
|
208
|
+
ExtractChromeAndroidPackageFromContextNameOption,
|
|
209
|
+
NativeWebScreenshotOption,
|
|
210
|
+
RecreateChromeDriverSessionsOption,
|
|
211
|
+
ShowChromedriverLogOption,
|
|
212
|
+
WebviewDevtoolsPortOption,
|
|
213
|
+
DisableSuppressAccessibilityServiceOption,
|
|
214
|
+
UserProfileOption,
|
|
215
|
+
):
|
|
216
|
+
@property
|
|
217
|
+
def default_capabilities(self) -> Dict:
|
|
218
|
+
return {
|
|
219
|
+
AUTOMATION_NAME: 'UIAutomator2',
|
|
220
|
+
PLATFORM_NAME: 'Android',
|
|
221
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from typing import Optional
|
|
19
|
+
|
|
20
|
+
from appium.options.common.supports_capabilities import SupportsCapabilities
|
|
21
|
+
|
|
22
|
+
DISABLE_WINDOWS_ANIMATION = 'disableWindowAnimation'
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class DisableWindowAnimationOption(SupportsCapabilities):
|
|
26
|
+
@property
|
|
27
|
+
def disable_window_animation(self) -> Optional[bool]:
|
|
28
|
+
"""
|
|
29
|
+
Whether window animations when starting the instrumentation process
|
|
30
|
+
are disabled.
|
|
31
|
+
"""
|
|
32
|
+
return self.get_capability(DISABLE_WINDOWS_ANIMATION)
|
|
33
|
+
|
|
34
|
+
@disable_window_animation.setter
|
|
35
|
+
def disable_window_animation(self, value: bool) -> None:
|
|
36
|
+
"""
|
|
37
|
+
Set whether to disable window animations when starting the instrumentation process.
|
|
38
|
+
false by default
|
|
39
|
+
"""
|
|
40
|
+
self.set_capability(DISABLE_WINDOWS_ANIMATION, value)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from typing import Optional
|
|
19
|
+
|
|
20
|
+
from appium.options.common.supports_capabilities import SupportsCapabilities
|
|
21
|
+
|
|
22
|
+
MJPEG_SERVER_PORT = 'mjpegServerPort'
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class MjpegServerPortOption(SupportsCapabilities):
|
|
26
|
+
@property
|
|
27
|
+
def mjpeg_server_port(self) -> Optional[int]:
|
|
28
|
+
"""
|
|
29
|
+
Number of the port UiAutomator2 server starts the MJPEG server on.
|
|
30
|
+
"""
|
|
31
|
+
return self.get_capability(MJPEG_SERVER_PORT)
|
|
32
|
+
|
|
33
|
+
@mjpeg_server_port.setter
|
|
34
|
+
def mjpeg_server_port(self, value: int) -> None:
|
|
35
|
+
"""
|
|
36
|
+
The number of the port UiAutomator2 server starts the MJPEG server on.
|
|
37
|
+
If not provided then the screenshots broadcasting service on the remote
|
|
38
|
+
device does not get exposed to a local port (e.g. no adb port forwarding
|
|
39
|
+
is happening).
|
|
40
|
+
"""
|
|
41
|
+
self.set_capability(MJPEG_SERVER_PORT, value)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from typing import Optional
|
|
19
|
+
|
|
20
|
+
from appium.options.common.supports_capabilities import SupportsCapabilities
|
|
21
|
+
|
|
22
|
+
SKIP_DEVICE_INITIALIZATION = 'skipDeviceInitialization'
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class SkipDeviceInitializationOption(SupportsCapabilities):
|
|
26
|
+
@property
|
|
27
|
+
def skip_device_initialization(self) -> Optional[bool]:
|
|
28
|
+
"""
|
|
29
|
+
Whether initial device startup checks by the server are disabled.
|
|
30
|
+
"""
|
|
31
|
+
return self.get_capability(SKIP_DEVICE_INITIALIZATION)
|
|
32
|
+
|
|
33
|
+
@skip_device_initialization.setter
|
|
34
|
+
def skip_device_initialization(self, value: bool) -> None:
|
|
35
|
+
"""
|
|
36
|
+
If set to true then device startup checks (whether it is ready and whether
|
|
37
|
+
Settings app is installed) will be canceled on session creation.
|
|
38
|
+
Could speed up the session creation if you know what you are doing. false by default
|
|
39
|
+
"""
|
|
40
|
+
self.set_capability(SKIP_DEVICE_INITIALIZATION, value)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from typing import Optional
|
|
19
|
+
|
|
20
|
+
from appium.options.common.supports_capabilities import SupportsCapabilities
|
|
21
|
+
|
|
22
|
+
SKIP_SERVER_INSTALLATION = 'skipServerInstallation'
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class SkipServerInstallationOption(SupportsCapabilities):
|
|
26
|
+
@property
|
|
27
|
+
def skip_server_installation(self) -> Optional[bool]:
|
|
28
|
+
"""
|
|
29
|
+
Whether to skip the server components installation
|
|
30
|
+
on the device under test and all the related checks.
|
|
31
|
+
"""
|
|
32
|
+
return self.get_capability(SKIP_SERVER_INSTALLATION)
|
|
33
|
+
|
|
34
|
+
@skip_server_installation.setter
|
|
35
|
+
def skip_server_installation(self, value: bool) -> None:
|
|
36
|
+
"""
|
|
37
|
+
Set whether to skip the server components installation
|
|
38
|
+
on the device under test and all the related checks.
|
|
39
|
+
This could help to speed up the session startup if you know for sure the
|
|
40
|
+
correct server version is installed on the device.
|
|
41
|
+
In case the server is not installed or an incorrect version of it is installed
|
|
42
|
+
then you may get an unexpected error later.
|
|
43
|
+
"""
|
|
44
|
+
self.set_capability(SKIP_SERVER_INSTALLATION, value)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from datetime import timedelta
|
|
19
|
+
from typing import Optional, Union
|
|
20
|
+
|
|
21
|
+
from appium.options.common.supports_capabilities import SupportsCapabilities
|
|
22
|
+
|
|
23
|
+
UIAUTOMATOR2_SERVER_INSTALL_TIMEOUT = 'uiautomator2ServerInstallTimeout'
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Uiautomator2ServerInstallTimeoutOption(SupportsCapabilities):
|
|
27
|
+
@property
|
|
28
|
+
def uiautomator2_server_install_timeout(self) -> Optional[timedelta]:
|
|
29
|
+
"""
|
|
30
|
+
Maximum timeout to wait until UiAutomator2 server is installed on the device.
|
|
31
|
+
"""
|
|
32
|
+
value = self.get_capability(UIAUTOMATOR2_SERVER_INSTALL_TIMEOUT)
|
|
33
|
+
return None if value is None else timedelta(milliseconds=value)
|
|
34
|
+
|
|
35
|
+
@uiautomator2_server_install_timeout.setter
|
|
36
|
+
def uiautomator2_server_install_timeout(self, value: Union[timedelta, int]) -> None:
|
|
37
|
+
"""
|
|
38
|
+
Set the maximum timeout to wait util UiAutomator2 server is installed on the device.
|
|
39
|
+
20000 ms by default
|
|
40
|
+
"""
|
|
41
|
+
self.set_capability(
|
|
42
|
+
UIAUTOMATOR2_SERVER_INSTALL_TIMEOUT,
|
|
43
|
+
int(value.total_seconds() * 1000) if isinstance(value, timedelta) else value,
|
|
44
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
2
|
+
# or more contributor license agreements. See the NOTICE file
|
|
3
|
+
# distributed with this work for additional information
|
|
4
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
5
|
+
# to you under the Apache License, Version 2.0 (the
|
|
6
|
+
# "License"); you may not use this file except in compliance
|
|
7
|
+
# with the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
|
12
|
+
# software distributed under the License is distributed on an
|
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
# KIND, either express or implied. See the License for the
|
|
15
|
+
# specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from datetime import timedelta
|
|
19
|
+
from typing import Optional, Union
|
|
20
|
+
|
|
21
|
+
from appium.options.common.supports_capabilities import SupportsCapabilities
|
|
22
|
+
|
|
23
|
+
UIAUTOMATOR2_SERVER_LAUNCH_TIMEOUT = 'uiautomator2ServerLaunchTimeout'
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Uiautomator2ServerLaunchTimeoutOption(SupportsCapabilities):
|
|
27
|
+
@property
|
|
28
|
+
def uiautomator2_server_launch_timeout(self) -> Optional[timedelta]:
|
|
29
|
+
"""
|
|
30
|
+
Maximum timeout to wait until UiAutomator2 server is listening on the device.
|
|
31
|
+
"""
|
|
32
|
+
value = self.get_capability(UIAUTOMATOR2_SERVER_LAUNCH_TIMEOUT)
|
|
33
|
+
return None if value is None else timedelta(milliseconds=value)
|
|
34
|
+
|
|
35
|
+
@uiautomator2_server_launch_timeout.setter
|
|
36
|
+
def uiautomator2_server_launch_timeout(self, value: Union[timedelta, int]) -> None:
|
|
37
|
+
"""
|
|
38
|
+
Set the maximum timeout to wait util UiAutomator2Server is listening on
|
|
39
|
+
the device. 30000 ms by default
|
|
40
|
+
"""
|
|
41
|
+
self.set_capability(
|
|
42
|
+
UIAUTOMATOR2_SERVER_LAUNCH_TIMEOUT,
|
|
43
|
+
int(value.total_seconds() * 1000) if isinstance(value, timedelta) else value,
|
|
44
|
+
)
|