{"id":22363111,"url":"https://github.com/lambdatest/lt-appium-php","last_synced_at":"2025-07-26T13:03:44.423Z","repository":{"id":37088596,"uuid":"480268520","full_name":"LambdaTest/LT-appium-php","owner":"LambdaTest","description":"Run PHP and Appium scripts on LambdaTest automation cloud. A sample repo to help you run PHP based test scripts in parallel with LambdaTest","archived":false,"fork":false,"pushed_at":"2023-01-06T11:41:10.000Z","size":2148,"stargazers_count":5,"open_issues_count":0,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-03-07T15:10:00.803Z","etag":null,"topics":["android-automation","app-automation","appium","appium-php","ios-automation","lambdatest","mobile-app-testing","php","testing-tools"],"latest_commit_sha":null,"homepage":"https://www.lambdatest.com/","language":"PHP","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-04-11T07:17:35.000Z","updated_at":"2022-06-13T15:17:34.000Z","dependencies_parsed_at":"2023-02-06T00:16:25.993Z","dependency_job_id":null,"html_url":"https://github.com/LambdaTest/LT-appium-php","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdaTest%2FLT-appium-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LambdaTest","download_url":"https://codeload.github.com/LambdaTest/LT-appium-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228154023,"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-php","ios-automation","lambdatest","mobile-app-testing","php","testing-tools"],"created_at":"2024-12-04T17:13:40.992Z","updated_at":"2024-12-04T17:13:41.595Z","avatar_url":"https://github.com/LambdaTest.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP With Appium ![pw](https://img.shields.io/badge/PHP-777BB4?style=for-the-badge\u0026logo=php\u0026logoColor=white)\n\n\u003cp align=\"center\"\u003e\n\u003cimg height=\"500\" src=\"https://user-images.githubusercontent.com/95698164/171857849-91e8c096-adf6-4bf1-82be-f21578e0176d.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-php\" 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-php\" 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-php\" 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-php\" 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-php\" 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-php)._\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-php)._\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-php)\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 begin automation testing with Selenium, you would need to follow these steps:\n\n### Clone The Sample Project\n\nClone the LambdaTest’s :link: [LT-appium-php](https://github.com/LambdaTest/LT-appium-php) repository and navigate to the code directory as shown below:\n\n```bash\ngit clone https://github.com/LambdaTest/LT-appium-php\ncd LT-appium-php\n```\n\n### Installing Project Dependencies\n\n\u003cdetails\u003e\n\n\u003csummary id=\"summary_2\"\u003e \u003cstrong\u003eInstall PHP (latest)\u003c/strong\u003e \u003c/summary\u003e\n\nDownload and install the latest version of PHP in your system.\n\n**MacOS:** Previous versions of **MacOS** have **PHP** installed by default. But for the latest **MacOS** versions starting with **Monterey**, **PHP** has to be downloaded and installed manually by using below commands:\n\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\nbrew install php\n```\n\n**Linux:**\n\n```bash\nsudo apt-get install curl libcurl3 libcurl3-dev php\n```\n\n**Windows:** You can download **PHP** from [here](http://windows.php.net/download/). Also, refer to this [documentation](http://php.net/manual/en/install.windows.php) for ensuring the accessibility of PHP through Command Prompt(cmd).\n\nPlease add php to Windows System Variables PATH.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary id=\"summary_2\"\u003e \u003cstrong\u003eDownload Composer in the project directory\u003c/strong\u003e\n\u003c/summary\u003e\n\n1. Download **composer** in the project directory from here ([Linux/MacOS](https://getcomposer.org/download/), [Windows](https://getcomposer.org/doc/00-intro.md#installation-windows)).\n\n**Tip Note:**\n\nTo use the **composer** command directly, it should have been downloaded in the project directory. In windows the composer gets installed in different directory. So, copy the 'composer.phar' to the project directory using copy command:\n\n```php\ncopy C:\\ProgramData\\ComposerSetup\\bin\\composer.phar\n```\n\n2. Install the composer dependencies in the current project directory using the commands below:\n\n```php\ncomposer update\nphp composer.phar require phpwhois/phpwhois\nphp composer.phar install\nphp composer.phar require php-webdriver/webdriver\n```\nIn case of any error, please try restarting.\n\n\u003c/details\u003e\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-php) or access the [Automation Dashboard](https://appautomation.lambdatest.com/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-php).\n\nSet LambdaTest `Username` and `Access Key` in environment variables.\n\n**For Linux/macOS:**\n\n```js\nexport LT_USERNAME=YOUR_LAMBDATEST_USERNAME \\\nexport LT_ACCESS_KEY=YOUR_LAMBDATEST_ACCESS_KEY\n```\n\n**For Windows:**\n\n```js\nset LT_USERNAME=YOUR_LAMBDATEST_USERNAME `\nset LT_ACCESS_KEY=YOUR_LAMBDATEST_ACCESS_KEY\n```\n\n### Upload Your Application\n\nUpload 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**For Linux/macOS:**\n\n```js\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**For Windows:**\n\n```js\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**For Linux/macOS:**\n\n```js\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```js\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\n**Test Scenario:** Check out [Android.php](https://github.com/LambdaTest/LT-appium-php/blob/master/AndroidApp.php) file to view the sample test script for android and [iOS.php](https://github.com/LambdaTest/LT-appium-php/blob/master/IOSApp.php) 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\u003cTabs className=\"docs__val\"\u003e\n\n\u003cTabItem value=\"ios-config\" label=\"iOS\" default\u003e\n\n```csharp title=\"iOS(.ipa)\"\n  $caps = array(\n      \"app\"=\u003e \"APP_URL\", //Enter app_url here\n      \"deviceName\" =\u003e \"iPhone 11\",\n      \"platformName\" =\u003e \"ios\",\n      \"platformVersion\" =\u003e \"14\",\n      \"isRealMobile\" =\u003e TRUE,\n      \"visual\" =\u003e TRUE,\n      \"video\" =\u003e TRUE,\n      \"name\" =\u003e \"Php - iOS test\",\n      \"build\" =\u003e \"Php Vanilla - iOS\"\n  );  \n```\n\n\u003c/TabItem\u003e\n\u003cTabItem value=\"android-config\" label=\"Android\" default\u003e\n\n```php title=\"Android(.apk)\"\n  $caps = array(\n        \"app\"=\u003e\"APP_URL\", //Enter app_url here\n        \"deviceName\" =\u003e \"Galaxy S20\",\n        \"platformName\" =\u003e \"Android\",\n        \"platformVersion\" =\u003e \"10\",\n        \"isRealMobile\" =\u003e TRUE,\n        \"visual\" =\u003e TRUE,\n        \"video\" =\u003e TRUE,\n        \"name\" =\u003e \"Php - Android test\",\n        \"build\" =\u003e \"Php Vanilla - Android\"\n    );\n```\n\n\u003c/TabItem\u003e\n\n\u003c/Tabs\u003e\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-php)**. 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-php).\n\n### Executing The Tests\n\nExecute the following command to run your test on LambdaTest platform:\n\n**IOS:**\n\n```bash\nphp IOSApp.php\n```\n\n**Android:**\n\n```bash\nphp AndroidApp.php\n```\n\n**Info:** Your test results would be displayed on the test console (or command-line interface if you are using terminal/cmd) and on the :link: [LambdaTest App Automation Dashboard](https://appautomation.lambdatest.com/build?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-php).\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-php)\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-php)\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-php)\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-php)\n- [LambdaTest Blog](https://www.lambdatest.com/blog/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-php)\n- [LambdaTest Learning Hub](https://www.lambdatest.com/learning-hub/?utm_source=github\u0026utm_medium=repo\u0026utm_campaign=LT-appium-php)\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-php) 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-php) 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-php)\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-php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdatest%2Flt-appium-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdatest%2Flt-appium-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdatest%2Flt-appium-php/lists"}