{"id":13651382,"url":"https://github.com/appium/python-client","last_synced_at":"2026-04-02T16:23:12.845Z","repository":{"id":15786210,"uuid":"18525395","full_name":"appium/python-client","owner":"appium","description":"Python language bindings for Appium","archived":false,"fork":false,"pushed_at":"2026-03-24T03:12:21.000Z","size":30048,"stargazers_count":1838,"open_issues_count":26,"forks_count":572,"subscribers_count":103,"default_branch":"master","last_synced_at":"2026-03-25T03:34:57.587Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appium.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"appium"}},"created_at":"2014-04-07T17:01:35.000Z","updated_at":"2026-03-24T03:12:25.000Z","dependencies_parsed_at":"2023-12-13T09:50:59.504Z","dependency_job_id":"1d72992c-fba1-4cc5-a676-e8d77a20ccbb","html_url":"https://github.com/appium/python-client","commit_stats":{"total_commits":668,"total_committers":61,"mean_commits":"10.950819672131148","dds":0.6646706586826348,"last_synced_commit":"fa7e6d44e13ea586bcbe73a1ba4464b97516ff51"},"previous_names":[],"tags_count":111,"template":false,"template_full_name":null,"purl":"pkg:github/appium/python-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appium%2Fpython-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appium%2Fpython-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appium%2Fpython-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appium%2Fpython-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appium","download_url":"https://codeload.github.com/appium/python-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appium%2Fpython-client/sbom","scorecard":{"id":203640,"data":{"date":"2025-08-11","repo":{"name":"github.com/appium/python-client","commit":"df66645ab284193f8f673d491c8daddcce381a71"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.9,"checks":[{"name":"Code-Review","score":4,"reason":"Found 9/19 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/functional-test.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/lock-update.yml:10","Warn: no topLevel permission defined: .github/workflows/pr-title.yml:1","Warn: no topLevel permission defined: .github/workflows/unit-test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:106: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:108: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:133: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/functional-test.yml:142: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:153: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/functional-test.yml:158: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:178: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:208: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:210: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:224: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:229: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/functional-test.yml:245: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:257: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/functional-test.yml:264: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/functional-test.yml:268: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/functional-test.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/functional-test.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/functional-test.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/functional-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lock-update.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/lock-update.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lock-update.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/lock-update.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lock-update.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/lock-update.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pr-title.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/pr-title.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/unit-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/appium/python-client/unit-test.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/functional-test.yml:58","Warn: npmCommand not pinned by hash: .github/workflows/functional-test.yml:120","Warn: npmCommand not pinned by hash: .github/workflows/functional-test.yml:235","Info:   0 out of  19 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   9 third-party GitHubAction dependencies pinned","Info:   0 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/appium/.github/SECURITY.md:1","Info: Found linked content: github.com/appium/.github/SECURITY.md:1","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy","Info: Found text in security policy: github.com/appium/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T23:15:31.578Z","repository_id":15786210,"created_at":"2025-08-16T23:15:31.579Z","updated_at":"2025-08-16T23:15:31.579Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31309834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T02:00:48.824Z","updated_at":"2026-04-02T16:23:12.834Z","avatar_url":"https://github.com/appium.png","language":"Python","funding_links":["https://opencollective.com/appium"],"categories":["Clients"],"sub_categories":[],"readme":"# Appium Python Client\n\n[![PyPI version](https://badge.fury.io/py/Appium-Python-Client.svg)](https://badge.fury.io/py/Appium-Python-Client)\n[![Downloads](https://pepy.tech/badge/appium-python-client)](https://pepy.tech/project/appium-python-client)\n\n[![Functional Tests](https://github.com/appium/python-client/actions/workflows/functional-test.yml/badge.svg)](https://github.com/appium/python-client/actions/workflows/functional-test.yml)\n\nAn extension library for adding [WebDriver Protocol](https://www.w3.org/TR/webdriver/) and Appium commands to the Selenium Python language binding for use with the mobile testing framework [Appium](https://appium.io).\n\n## Getting the Appium Python client\n\nThere are three ways to install and use the Appium Python client.\n\n1. Install from [PyPi](https://pypi.org), as\n['Appium-Python-Client'](https://pypi.org/project/Appium-Python-Client/).\n\n    ```shell\n    pip install Appium-Python-Client\n    ```\n\n    You can see the history from [here](https://pypi.org/project/Appium-Python-Client/#history)\n\n2. Install from source, via [PyPi](https://pypi.org). From ['Appium-Python-Client'](https://pypi.org/project/Appium-Python-Client/),\ndownload and unarchive the source tarball (Appium-Python-Client-X.X.tar.gz).\n\n    ```shell\n    tar -xvf Appium-Python-Client-X.X.tar.gz\n    cd Appium-Python-Client-X.X\n    python setup.py install\n    ```\n\n3. Install from source via [GitHub](https://github.com/appium/python-client).\n\n    ```shell\n    git clone git@github.com:appium/python-client.git\n    cd python-client\n    python setup.py install\n    ```\n\n## Compatibility Matrix\n\n|Appium Python Client| Selenium binding| Python version |\n|----|----|----|\n|`5.1.1`+|`4.26.0`+ | 3.9+ |\n|`4.5.0` - `5.1.0`|`4.26.0` - `4.31.0` | 3.9+ |\n|`4.3.0` -  `4.4.0`|`4.26.0` - `4.31.0` | 3.8+ |\n|`3.0.0` - `4.2.1` |`4.12.0` - `4.25.0` | 3.8+ |\n|`2.10.0` - `2.11.1` |`4.1.0` - `4.11.2` | 3.7+ |\n|`2.2.0` - `2.9.0` |`4.1.0` - `4.9.0` | 3.7+ |\n|`2.0.0` - `2.1.4` |`4.0.0` | 3.7+ |\n|`1.0.0` - `1.3.0` |`3.x`| 3.7+ |\n|`0.52` and below|`3.x`| 2.7, 3.4 - 3.7 |\n\nThe Appium Python Client depends on [Selenium Python binding](https://pypi.org/project/selenium/), thus\nthe Selenium Python binding update might affect the Appium Python Client behavior.\nFor example, some changes in the Selenium binding could break the Appium client.\n\n\u003e **Note**\n\u003e We strongly recommend you manage dependencies with version management tools such as\n\u003e [uv](https://docs.astral.sh/uv/) to keep compatible version combinations.\n\n\n### Quick migration guide from v4 to v5\n- This change affects only for users who specify `keep_alive`, `direct_connection` and `strict_ssl` arguments for `webdriver.Remote`:\n    - Please use `AppiumClientConfig` as `client_config` argument similar to how it is specified below:\n        ```python\n        SERVER_URL_BASE = 'http://127.0.0.1:4723'\n        # before\n        driver = webdriver.Remote(\n            SERVER_URL_BASE,\n            options=UiAutomator2Options().load_capabilities(desired_caps),\n            direct_connection=True,\n            keep_alive=False,\n            strict_ssl=False\n        )\n\n        # after\n        from appium.webdriver.client_config import AppiumClientConfig\n        client_config = AppiumClientConfig(\n            remote_server_addr=SERVER_URL_BASE,\n            direct_connection=True,\n            keep_alive=False,\n            ignore_certificates=True,\n        )\n        driver = webdriver.Remote(\n            options=UiAutomator2Options().load_capabilities(desired_caps),\n            client_config=client_config\n        )\n        ```\n        - Note that you can keep using `webdriver.Remote(url, options=options, client_config=client_config)` format as well.\n        In such case the `remote_server_addr` argument of `AppiumClientConfig` constructor would have priority over the `url` argument of `webdriver.Remote` constructor.\n- Use `http://127.0.0.1:4723` as the default server url instead of `http://127.0.0.1:4444/wd/hub`\n\n### Quick migration guide from v3 to v4\n- Removal\n    - `MultiAction` and `TouchAction` are removed. Please use W3C WebDriver actions or `mobile:` extensions\n        - [appium/webdriver/extensions/action_helpers.py](appium/webdriver/extensions/action_helpers.py)\n        - https://www.selenium.dev/documentation/webdriver/actions_api/\n        - https://www.youtube.com/watch?v=oAJ7jwMNFVU\n        - https://appiumpro.com/editions/30-ios-specific-touch-action-methods\n        - https://appiumpro.com/editions/29-automating-complex-gestures-with-the-w3c-actions-api\n    - Deprecated `AppiumBy.WINDOWS_UI_AUTOMATION`, which has no usage right now.\n\n### Quick migration guide from v2 to v3\n- `options` keyword argument in the `webdriver.Remote` constructor such as `XCUITestOptions` instead of `desired_capabilities`\n    - Available options are https://github.com/appium/python-client/tree/master/appium/options\n        - Please check the [Usage](#usage) below as an example.\n    - Not a \"new\" change, but the `desired_capabilities` argument has been removed since v3.\n- Replacement\n    - `start_activity` method: Please use [`mobile: startActivity`](https://github.com/appium/appium-uiautomator2-driver?tab=readme-ov-file#mobile-startactivity)\n    - `launch_app`, `close_app` and `reset` methods: Please refer to https://github.com/appium/appium/issues/15807\n    - `available_ime_engines`, `is_ime_active`, `activate_ime_engine`, `deactivate_ime_engine` and `active_ime_engine` methods: Please use [`mobile: shell`](https://github.com/appium/appium-uiautomator2-driver?tab=readme-ov-file#mobile-shell)\n    - `set_value` and `set_text` methods: Please use `element.send_keys` or `send_keys` by W3C Actions\n- Removal\n    - `end_test_coverage` method is no longer available\n    - `session` property is no longer available\n    - `all_sessions` property is no longer available\n\n### Quick migration guide from v1 to v2\n- Enhancement\n    - Updated base Selenium Python binding version to v4\n        - Removed `forceMjsonwp` since Selenium v4 and Appium Python client v2 expect only W3C WebDriver protocol\n    - Methods `ActionHelpers#scroll`, `ActionHelpers#drag_and_drop`, `ActionHelpers#tap`, `ActionHelpers#swipe` and `ActionHelpers#flick` now call W3C actions as its backend\n        - Please check each behavior. Their behaviors could slightly differ.\n    - Added `strict_ssl` to relax SSL errors such as self-signed ones\n- Deprecated\n    - `MultiAction` and `TouchAction` are deprecated. Please use W3C WebDriver actions or `mobile:` extensions\n    - `launch_app`, `close_app`, and `reset` are deprecated. Please read [issues#15807](https://github.com/appium/appium/issues/15807) for more details\n\n#### MultiAction/TouchAction to W3C actions\n\nSome elements can be handled with `touch` pointer action instead of the default `mouse` pointer action in the Selenium Python client.\nFor example, the below action builder is to replace the default one with the `touch` pointer action.\n\n```python\nfrom selenium.webdriver import ActionChains\nfrom selenium.webdriver.common.actions import interaction\nfrom selenium.webdriver.common.actions.action_builder import ActionBuilder\nfrom selenium.webdriver.common.actions.pointer_input import PointerInput\n\nactions = ActionChains(driver)\n# override as 'touch' pointer action\nactions.w3c_actions = ActionBuilder(driver, mouse=PointerInput(interaction.POINTER_TOUCH, \"touch\"))\nactions.w3c_actions.pointer_action.move_to_location(start_x, start_y)\nactions.w3c_actions.pointer_action.pointer_down()\nactions.w3c_actions.pointer_action.pause(2)\nactions.w3c_actions.pointer_action.move_to_location(end_x, end_y)\nactions.w3c_actions.pointer_action.release()\nactions.perform()\n```\n\n- [appium/webdriver/extensions/action_helpers.py](appium/webdriver/extensions/action_helpers.py)\n- https://www.selenium.dev/documentation/webdriver/actions_api/\n\n## Usage\n\nThe Appium Python Client is fully compliant with the WebDriver Protocol\nincluding several helpers to make mobile testing in Python easier.\n\nTo use the new functionality now, and to use the superset of functions, instead of\nincluding the Selenium `webdriver` module in your test code, use that from\nAppium instead.\n\n```python\nfrom appium import webdriver\n```\n\nFrom there much of your test code will work with no change.\n\nAs a base for the following code examples, the following set up the [UnitTest](https://docs.python.org/3/library/unittest.html)\nenvironment:\n\n```python\n# Python/Pytest\nimport pytest\n\nfrom appium import webdriver\n# Options are only available since client version 2.3.0\n# If you use an older client then switch to desired_capabilities\n# instead: https://github.com/appium/python-client/pull/720\nfrom appium.options.android import UiAutomator2Options\nfrom appium.options.ios import XCUITestOptions\nfrom appium.webdriver.appium_service import AppiumService\nfrom appium.webdriver.common.appiumby import AppiumBy\n\nAPPIUM_PORT = 4723\nAPPIUM_HOST = '127.0.0.1'\n\n\n# HINT: fixtures below could be extracted into conftest.py\n# HINT: and shared across all tests in the suite\n@pytest.fixture(scope='session')\ndef appium_service():\n    service = AppiumService()\n    service.start(\n        # Check the output of `appium server --help` for the complete list of\n        # server command line arguments\n        args=['--address', APPIUM_HOST, '-p', str(APPIUM_PORT)],\n        timeout_ms=20000,\n    )\n    yield service\n    service.stop()\n\n\ndef create_ios_driver(custom_opts = None):\n    options = XCUITestOptions()\n    options.platformVersion = '13.4'\n    options.udid = '123456789ABC'\n    if custom_opts is not None:\n        options.load_capabilities(custom_opts)\n    # Appium1 points to http://127.0.0.1:4723/wd/hub by default\n    return webdriver.Remote(f'http://{APPIUM_HOST}:{APPIUM_PORT}', options=options)\n\n\ndef create_android_driver(custom_opts = None):\n    options = UiAutomator2Options()\n    options.platformVersion = '10'\n    options.udid = '123456789ABC'\n    if custom_opts is not None:\n        options.load_capabilities(custom_opts)\n    # Appium1 points to http://127.0.0.1:4723/wd/hub by default\n    return webdriver.Remote(f'http://{APPIUM_HOST}:{APPIUM_PORT}', options=options)\n\n\n@pytest.fixture\ndef ios_driver_factory():\n    return create_ios_driver\n\n\n@pytest.fixture\ndef ios_driver():\n    # prefer this fixture if there is no need to customize driver options in tests\n    driver = create_ios_driver()\n    yield driver\n    driver.quit()\n\n\n@pytest.fixture\ndef android_driver_factory():\n    return create_android_driver\n\n\n@pytest.fixture\ndef android_driver():\n    # prefer this fixture if there is no need to customize driver options in tests\n    driver = create_android_driver()\n    yield driver\n    driver.quit()\n\n\ndef test_ios_click(appium_service, ios_driver_factory):\n    # Usage of the context manager ensures the driver session is closed properly\n    # after the test completes. Otherwise, make sure to call `driver.quit()` on teardown.\n    with ios_driver_factory({\n        'appium:app': '/path/to/app/UICatalog.app.zip'\n    }) as driver:\n        el = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='item')\n        el.click()\n\n\ndef test_android_click(appium_service, android_driver_factory):\n    # Usage of the context manager ensures the driver session is closed properly\n    # after the test completes. Otherwise, make sure to call `driver.quit()` on teardown.\n    with android_driver_factory({\n        'appium:app': '/path/to/app/test-app.apk',\n        'appium:udid': '567890',\n    }) as driver:\n        el = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value='item')\n        el.click()\n```\n\n### Available `options`\n\nAppium Python Client has a common options class named `AppiumOptions` but the available commands are minimal.\nIt does not have driver/automationName specific commands unless adding commands with `add_command` method.\n\nAvailable options for each automation name below will help to check what options are already defined.\nPlease use proper options for your automaiton usage.\n\n`automationName` | Package path\n|:---|:-----|\nany | `appium.options.common.base.AppiumOptions`\n`uiautomator2` | `appium.options.android.Uiautomator2Options`\n`espresso` | `appium.options.android.EspressoOptions`\n`xcuitest` | `appium.options.ios.XCUITestOptions`\n`safari` | `appium.options.ios.SafariOptions`\n`mac2` | `appium.options.mac.Mac2Options`\n`windows` | `appium.options.WindowsOptions`\n`gecko` | `appium.options.GeckoOptions`\n`flutterintegration` | `appium.options.flutter_integration.FlutterOptions`\n\n## Direct Connect URLs\n\nIf your Selenium/Appium server decorates the new session capabilities response with the following keys:\n\n- `directConnectProtocol`\n- `directConnectHost`\n- `directConnectPort`\n- `directConnectPath`\n\nThen python client will switch its endpoint to the one specified by the values of those keys.\n\n```python\nfrom appium import webdriver\n# Options are only available since client version 2.3.0\n# If you use an older client then switch to desired_capabilities\n# instead: https://github.com/appium/python-client/pull/720\nfrom appium.options.ios import XCUITestOptions\nfrom appium.webdriver.client_config import AppiumClientConfig\n\n# load_capabilities API could be used to\n# load options mapping stored in a dictionary\noptions = XCUITestOptions().load_capabilities({\n    'platformVersion': '13.4',\n    'deviceName': 'iPhone Simulator',\n    'app': '/full/path/to/app/UICatalog.app.zip',\n})\n\nclient_config = AppiumClientConfig(\n    remote_server_addr='http://127.0.0.1:4723',\n    direct_connection=True\n)\n\ndriver = webdriver.Remote(\n    # Appium1 points to http://127.0.0.1:4723/wd/hub by default\n    'http://127.0.0.1:4723',\n    options=options,\n    client_config=client_config\n)\n```\n\n## Relax SSL validation\n\n`strict_ssl` option allows you to send commands to an invalid certificate host like a self-signed one.\n\n```python\nfrom appium import webdriver\n# Options are only available since client version 2.3.0\n# If you use an older client then switch to desired_capabilities\n# instead: https://github.com/appium/python-client/pull/720\nfrom appium.options.common import AppiumOptions\n\noptions = AppiumOptions()\noptions.platform_name = 'mac'\noptions.automation_name = 'safari'\n# set_capability API allows to provide any custom option\n# calls to it could be chained\noptions.set_capability('browser_name', 'safari')\n\n# Appium1 points to http://127.0.0.1:4723/wd/hub by default\ndriver = webdriver.Remote('http://127.0.0.1:4723', options=options, strict_ssl=False)\n```\n\nSince Appium Python client v4.3.0, we recommend using `selenium.webdriver.remote.client_config.ClientConfig`\ninstead of giving `strict_ssl` as an argument of `webdriver.Remote` below to configure the validation.\n\n```python\nfrom appium import webdriver\n\nfrom selenium.webdriver.remote.client_config import ClientConfig\n\nclient_config = ClientConfig(\n    remote_server_addr='http://127.0.0.1:4723',\n    ignore_certificates=True\n)\ndriver = webdriver.Remote(client_config.remote_server_addr, options=options, client_config=client_config)\n```\n\n## Set custom `AppiumConnection`\n\nThe first argument of `webdriver.Remote` can set an arbitrary command executor for you.\n\n1. Set init arguments for the pool manager Appium Python client uses to manage HTTP requests.\n\n```python\nfrom appium import webdriver\nfrom appium.options.ios import XCUITestOptions\n\nimport urllib3\nfrom appium.webdriver.appium_connection import AppiumConnection\n\n# Retry connection error up to 3 times.\ninit_args_for_pool_manage = {\n    'retries': urllib3.util.retry.Retry(total=3, connect=3, read=False)\n}\nappium_executor = AppiumConnection(\n    remote_server_addr='http://127.0.0.1:4723',\n    init_args_for_pool_manage=init_args_for_pool_manage\n)\n\noptions = XCUITestOptions()\noptions.platformVersion = '13.4'\noptions.udid = '123456789ABC'\noptions.app = '/full/path/to/app/UICatalog.app.zip'\ndriver = webdriver.Remote(appium_executor, options=options)\n```\n\n\n2. Define a subclass of `AppiumConnection`\n\n```python\nfrom appium import webdriver\nfrom appium.options.ios import XCUITestOptions\n\nfrom appium.webdriver.appium_connection import AppiumConnection\n\nclass CustomAppiumConnection(AppiumConnection):\n    # Can add your own methods for the custom class\n    pass\n\ncustom_executor = CustomAppiumConnection(remote_server_addr='http://127.0.0.1:4723')\n\noptions = XCUITestOptions().load_capabilities({\n    'platformVersion': '13.4',\n    'deviceName': 'iPhone Simulator',\n    'app': '/full/path/to/app/UICatalog.app.zip',\n})\ndriver = webdriver.Remote(custom_executor, options=options)\n\n```\n\nThe `AppiumConnection` can set `selenium.webdriver.remote.client_config.ClientConfig` as well.\n\n## Relaxing HTTP request read timeout\n\nAppium Python Client has `120` seconds read timeout on each HTTP request since the version v4.3.0 because of\nthe corresponding selenium binding version.\nYou have two methods to extend the read timeout.\n\n1. **Recommend** Configure timeout via `appium.webdriver.client_config.AppiumClientConfig` or `selenium.webdriver.remote.client_config.ClientConfig`\n    - `timeout` argument, or\n    - `init_args_for_pool_manager` argument for `urllib3.PoolManager`\n2. Set `GLOBAL_DEFAULT_TIMEOUT` environment variable\n    - This env var will be removed from the selenium binding ([issue](https://github.com/SeleniumHQ/selenium/issues/15604))\n\n## Documentation\n\n- https://appium.github.io/python-client-sphinx/ is detailed documentation\n- [functional tests](test/functional) also may help to see concrete examples.\n\n## Development\n\n- Code Style: [PEP-0008](https://www.python.org/dev/peps/pep-0008/)\n  - Apply `ruff` as pre commit hook\n  - Run `make` command for development. See `make help` output for details\n- Docstring style: [Google Style](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)\n\n### Setup\n\n```bash\nmake install-uv\nexec $SHELL\nmake sync-dev\n```\n\nRunning above commands should automatically setup the virtual environment for the project\nusing the default system Python version and put it into the `.venv` folder under the project root.\nIf you'd like to customize the Python version then run the following command before `make sync-dev`:\n\n```bash\nuv venv --python \u003cV\u003e\n```\n\nwhere `\u003cV\u003e` is the actual Python version, for example `3.12`.\n\nIf you want to customize the folder where uv stores the virtual environment by default\n(e.g. `.venv`) then add an argument containing the destination folder path to the above command:\n\n```bash\nuv venv /venv/root/folder\n```\n\nIn order to activate the newly created virtual environment you may either source it:\n\n```bash\nsource /venv/root/folder/bin/activate\n```\n\nor add it to PATH:\n\n```bash\nexport \"PATH=/venv/root/folder/bin:$PATH\"\n```\n\n### Linting And Formatting\n\nRun linter and format checks\n\n```bash\nmake check\n```\n\nAddress autofixable linter and formatting issues\n\n```bash\nmake fix\n```\n\n### Testing\n\n#### Unit\n\n```bash\nmake unittest\n```\n\nRun in parallel (2 threads)\n\n```bash\nmake unittest ARGS=\"-n 2\"\n```\n\n#### Functional\n\n```bash\nuv run pytest test/functional/ios/search_context/find_by_ios_class_chain_tests.py\n```\n\n#### In parallel for iOS\n\n1. Create simulators named 'iPhone X - 8100' and 'iPhone X - 8101'\n1. Run tests\n\n```bash\nuv run pytest -n 2 test/functional/ios/search_context/find_by_ios_class_chain_tests.py\n```\n\n## Release\n\nIn case you need to release a version manually.\n\n```bash\nrm -rf dist\n# bumping the version, building a package and creating a tag.\nuv run semantic-release version --patch|--minor|--major\n\n# To publish the version's module to pypi\nUV_PUBLISH_TOKEN=\u003ctoken to publish via pypi\u003e uv publish\n\n# To push built modules in 'dist' directory to the GH release page.\nuv run semantic-release publish\n```\n\n## License\n\nApache License v2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappium%2Fpython-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappium%2Fpython-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappium%2Fpython-client/lists"}