{"id":22363028,"url":"https://github.com/lambdatest/lt-appium-python","last_synced_at":"2025-07-30T15:30:50.272Z","repository":{"id":36993189,"uuid":"446345119","full_name":"LambdaTest/LT-appium-python","owner":"LambdaTest","description":"Run Python and Appium scripts on LambdaTest automation cloud. A sample repo to help you run Python based test scripts in parallel with LambdaTest","archived":false,"fork":false,"pushed_at":"2023-08-16T13:45:36.000Z","size":44,"stargazers_count":9,"open_issues_count":0,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-08-16T15:58:19.200Z","etag":null,"topics":["android-automation","app-automation","appium","appium-python","ios-automation","lambdatest","mobile-app-testing","python","testing-tools"],"latest_commit_sha":null,"homepage":"https://www.lambdatest.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LambdaTest.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-10T08:47:54.000Z","updated_at":"2023-07-10T11:24:23.000Z","dependencies_parsed_at":"2023-01-17T12:31:37.436Z","dependency_job_id":null,"html_url":"https://github.com/LambdaTest/LT-appium-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LambdaTest","download_url":"https://codeload.github.com/LambdaTest/LT-appium-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228154024,"owners_count":17877704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["android-automation","app-automation","appium","appium-python","ios-automation","lambdatest","mobile-app-testing","python","testing-tools"],"created_at":"2024-12-04T17:13:18.877Z","updated_at":"2024-12-04T17:13:19.617Z","avatar_url":"https://github.com/LambdaTest.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python With Appium ![pw](https://img.shields.io/badge/Python-FFD43B?style=for-the-badge\u0026logo=python\u0026logoColor=blue)\n\n\u003cp align=\"center\"\u003e\n\u003cimg height=\"500\" src=\"https://user-images.githubusercontent.com/95698164/171858189-9de5d3ef-f177-49ac-9de6-6edb3441740b.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.lambdatest.com/blog/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python\" target=\"_bank\"\u003eBlog\u003c/a\u003e\n  \u0026nbsp; \u0026#8901; \u0026nbsp;\n  \u003ca href=\"https://www.lambdatest.com/support/docs/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python\" target=\"_bank\"\u003eDocs\u003c/a\u003e\n  \u0026nbsp; \u0026#8901; \u0026nbsp;\n  \u003ca href=\"https://www.lambdatest.com/learning-hub/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python\" target=\"_bank\"\u003eLearning Hub\u003c/a\u003e\n  \u0026nbsp; \u0026#8901; \u0026nbsp;\n  \u003ca href=\"https://www.lambdatest.com/newsletter/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python\" target=\"_bank\"\u003eNewsletter\u003c/a\u003e\n  \u0026nbsp; \u0026#8901; \u0026nbsp;\n  \u003ca href=\"https://www.lambdatest.com/certifications/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python\" target=\"_bank\"\u003eCertifications\u003c/a\u003e\n  \u0026nbsp; \u0026#8901; \u0026nbsp;\n  \u003ca href=\"https://www.youtube.com/c/LambdaTest\" target=\"_bank\"\u003eYouTube\u003c/a\u003e\n\u003c/p\u003e\n\u0026emsp;\n\u0026emsp;\n\u0026emsp;\n\n_Appium is a tool for automating native, mobile web, and hybrid applications on iOS, Android, and Windows platforms. It supports iOS native apps written in Objective-C or Swift and Android native apps written in Java or Kotlin. It also supports mobile web apps accessed using a mobile browser (Appium supports Safari on iOS and Chrome or the built-in 'Browser' app on Android). Perform Appium automation tests on [LambdaTest's online cloud](https://www.lambdatest.com/appium-mobile-testing?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)._\n\n_Learn the basics of [Appium testing on the LambdaTest platform](https://www.lambdatest.com/support/docs/getting-started-with-appium-testing/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)._\n\n[\u003cimg height=\"53\" width=\"200\" src=\"https://user-images.githubusercontent.com/70570645/171866795-52c11b49-0728-4229-b073-4b704209ddde.png\"\u003e](https://accounts.lambdatest.com/register?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)\n\n## Table of Contents\n\n- [Pre-requisites](#pre-requisites)\n- [Run Your First Test](#run-your-first-test)\n- [Executing The Tests](#executing-the-tests)\n\n## Pre-requisites\n\nBefore you can start performing App automation testing with Appium, you would need to follow these steps:\n\n- Install the latest Python build from the [official website](https://www.python.org/downloads/). We recommend using the latest version.\n- Make sure **pip** is installed in your system. You can install **pip** from [here](https://pip.pypa.io/en/stable/installation/).\n\n### Clone The Sample Project\n\nClone the LambdaTest’s [LT-appium-python](https://github.com/LambdaTest/LT-appium-python) and navigate to the code directory as shown below:\n\n```bash\ngit clone https://github.com/LambdaTest/LT-appium-python\ncd LT-appium-python\n```\n\nInstall the required dependencies by using the following command:\n\n```bash\npip install -r requirements.txt\n```\n\n### Setting Up Your Authentication\n\nMake sure you have your LambdaTest credentials with you to run test automation scripts on LambdaTest. To obtain your access credentials, [purchase a plan](https://billing.lambdatest.com/billing/plans?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python) or access the [Automation Dashboard](https://appautomation.lambdatest.com/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python).\n\nSet LambdaTest `Username` and `Access Key` in environment variables.\n\n**For Linux/macOS:**\n\n```bash\nexport LT_USERNAME=YOUR_LAMBDATEST_USERNAME \\\nexport LT_ACCESS_KEY=YOUR_LAMBDATEST_ACCESS_KEY\n```\n\n**For Windows:**\n\n```powershell\nset LT_USERNAME=YOUR_LAMBDATEST_USERNAME `\nset LT_ACCESS_KEY=YOUR_LAMBDATEST_ACCESS_KEY\n```\n\n### Upload Your Application\n\n**Step-3:** Upload your **_iOS_** application (.ipa file) or **_android_** application (.apk file) to the LambdaTest servers using our **REST API**. You need to provide your **Username** and **AccessKey** in the format `Username:AccessKey` in the **cURL** command for authentication. Make sure to add the path of the **appFile** in the cURL request. Here is an example cURL request to upload your app using our REST API:\n\n**Using App File:**\n\n**Linux/macOS:**\n\n```bash\ncurl -u \"YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY\" \\\n--location --request POST 'https://manual-api.lambdatest.com/app/upload/realDevice' \\\n--form 'name=\"Android_App\"' \\\n--form 'appFile=@\"/Users/macuser/Downloads/proverbial_android.apk\"'\n```\n\n**Windows:**\n\n```powershell\ncurl -u \"YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY\" -X POST \"https://manual-api.lambdatest.com/app/upload/realDevice\" -F \"appFile=@\"/Users/macuser/Downloads/proverbial_android.apk\"\"\n```\n\n**Using App URL:**\n\n**Linux/macOS:**\n\n```bash\ncurl -u \"YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY\" \\\n--location --request POST 'https://manual-api.lambdatest.com/app/upload/realDevice' \\\n--form 'name=\"Android_App\"' \\\n--form 'url=\"https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk\"'\n```\n\n**For Windows:**\n\n```powershell\ncurl -u \"YOUR_LAMBDATEST_USERNAME:YOUR_LAMBDATEST_ACCESS_KEY\" -X POST \"https://manual-api.lambdatest.com/app/upload/realDevice\" -d \"{\"url\":\"https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk\",\"name\":\"sample.apk\"}\"\n```\n\n**Tip:**\n\n- If you do not have any **.apk** or **.ipa** file, you can run your sample tests on LambdaTest by using our sample :link: [Android app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_android.apk) or sample :link: [iOS app](https://prod-mobile-artefacts.lambdatest.com/assets/docs/proverbial_ios.ipa).\n- Response of above cURL will be a **JSON** object containing the `App URL` of the format - \u003clt://APP123456789123456789\u003e and will be used in the next step.\n\n## Run Your First Test\n\nOnce you are done with the above-mentioned steps, you can initiate your first Python test on LambdaTest.\n\n**Test Scenario:** Check out [Android.py](https://github.com/LambdaTest/LT-appium-python/blob/master/android.py) file to view the sample test script for android and [iOS.py](https://github.com/LambdaTest/LT-appium-python/blob/master/ios.py) for iOS.\n\n### Configuring Your Test Capabilities\n\nYou can update your custom capabilities in test scripts. In this sample project, we are passing platform name, platform version, device name and app url (generated earlier) along with other capabilities like build name and test name via capabilities object. The capabilities object in the sample code are defined as:\n\n**iOS:**\n\n```python title=\"iOS(.ipa)\"\n desired_caps = {\n    \"deviceName\":\"iPhone 12\",\n    \"platformName\":\"ios\",\n    \"platformVersion\":\"14\",\n    \"isRealMobile\":True,\n    \"app\":\"YOUR_APP_URL\",\n    \"build\":\"Python Vanilla iOS\",\n    \"name\":\"Sample Test - Python\",\n    \"network\":True,\n    \"visual\":True,\n    \"video\":True\n}\n```\n**Android:**\n\n```python title=\"Android(.apk)\"\ndesired_caps = {\n    \"deviceName\":\"Galaxy S20\",\n    \"platformName\":\"Android\",\n    \"platformVersion\":\"10\",\n    \"app\":\"YOUR_APP_URL\",\n    \"isRealMobile\":True,\n    \"build\":\"Python Vanilla Android\",\n    \"name\":\"Sample Test - Python\",\n    \"network\":True,\n    \"visual\":True,\n    \"video\":True\n}\n```\n\n**Info Note:**\n\n- You must add the generated **APP_URL** to the `\"app\"` capability in the config file.\n- You can generate capabilities for your test requirements with the help of our inbuilt **[Capabilities Generator tool](https://www.lambdatest.com/capabilities-generator/beta/index.html?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)**. A more Detailed Capability Guide is available [here](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python).\n\n## Executing The Tests\n\nRun the following command in the directory where your project has been saved to execute your build.\n\n**Android:**\n\n```bash\npython3 android.py\n```\n\n**IOS:**\n\n```bash\npython3 ios.py\n```\n**Info Note:**\nIf you are unable to run the automation script with the above mentioned commands try **'python'** command except for **'python3'**.\n\n\u003e Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on the [LambdaTest App Automation Dashboard](https://appautomation.lambdatest.com/build?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python).\n\n\u003e If you fail to run the tests, try creating virtual env and installing the dependencies in that environment to run the tests.\n\u003e Creating and activating a virtual environment\n\n```\npip3 install virtualenv\nvirtualenv venv\nsource venv/bin/activate\n```\n\n## Additional Links\n\n- [Advanced Configuration for Capabilities](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)\n- [How to test locally hosted apps](https://www.lambdatest.com/support/docs/testing-locally-hosted-pages/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)\n- [How to integrate LambdaTest with CI/CD](https://www.lambdatest.com/support/docs/integrations-with-ci-cd-tools/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)\n\n## Documentation \u0026 Resources :books:\n\nVisit the following links to learn more about LambdaTest's features, setup and tutorials around test automation, mobile app testing, responsive testing, and manual testing.\n\n- [LambdaTest Documentation](https://www.lambdatest.com/support/docs/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)\n- [LambdaTest Blog](https://www.lambdatest.com/blog/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)\n- [LambdaTest Learning Hub](https://www.lambdatest.com/learning-hub/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)\n\n## LambdaTest Community :busts_in_silhouette:\n\nThe [LambdaTest Community](https://community.lambdatest.com/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python) allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe 🌎\n\n## What's New At LambdaTest ❓\n\nTo stay updated with the latest features and product add-ons, visit [Changelog](https://changelog.lambdatest.com/)\n\n## About LambdaTest\n\n[LambdaTest](https://www.lambdatest.com?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python) is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.\n\n### Features\n\n- Run Selenium, Cypress, Puppeteer, Playwright, and Appium automation tests across 3000+ real desktop and mobile environments.\n- Real-time cross browser testing on 3000+ environments.\n- Test on Real device cloud\n- Blazing fast test automation with HyperExecute\n- Accelerate testing, shorten job times and get faster feedback on code changes with Test At Scale.\n- Smart Visual Regression Testing on cloud\n- 120+ third-party integrations with your favorite tool for CI/CD, Project Management, Codeless Automation, and more.\n- Automated Screenshot testing across multiple browsers in a single click.\n- Local testing of web and mobile apps.\n- Online Accessibility Testing across 3000+ desktop and mobile browsers, browser versions, and operating systems.\n- Geolocation testing of web and mobile apps across 53+ countries.\n- LT Browser - for responsive testing across 50+ pre-installed mobile, tablets, desktop, and laptop viewports\n\n[\u003cimg height=\"53\" width=\"200\" src=\"https://user-images.githubusercontent.com/70570645/171866795-52c11b49-0728-4229-b073-4b704209ddde.png\"\u003e](https://accounts.lambdatest.com/register?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)\n\n## We are here to help you :headphones:\n\n- Got a query? we are available 24x7 to help. [Contact Us](mailto:support@lambdatest.com)\n- For more info, visit - [LambdaTest](https://www.lambdatest.com/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-python)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdatest%2Flt-appium-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdatest%2Flt-appium-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdatest%2Flt-appium-python/lists"}