https://github.com/wasiqb/appium-locator-sample
Demo project for Appium supported locators
https://github.com/wasiqb/appium-locator-sample
appium demonstration espresso locators uiautomator2 xcuitest
Last synced: 3 months ago
JSON representation
Demo project for Appium supported locators
- Host: GitHub
- URL: https://github.com/wasiqb/appium-locator-sample
- Owner: WasiqB
- Created: 2022-07-31T07:20:28.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-19T06:40:45.000Z (almost 3 years ago)
- Last Synced: 2024-12-31T21:13:27.371Z (5 months ago)
- Topics: appium, demonstration, espresso, locators, uiautomator2, xcuitest
- Language: Java
- Homepage:
- Size: 16 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Appium Locator sample
This repository is used for demonstrating different locator strategies supported by Appium.
## Prerequisites
You must have Java JDK 11 installed on your machine.
For running the tests on LambdaTest cloud platform, you must have a valid LambdaTest account.
Also, you must save your username and access key in the environment variables of your `.zshrc` / `.bash_profile`. If you
are on Windows, you must save your API key and secret in the System environment variables.```shell
export LT_USERNAME=
export LT_ACCESS_KEY=
export LT_APP_ANDROID=
export LT_APP_ANDROID_2=
export LT_APP_IOS=
```## What tests are there?
### `LocatorsAndroidEspressoCloudTest.java` and `LocatorsAndroidEspressoTest.java`
This test class contains the tests for,
- `testByDataMatcher`
- `testByViewMatcher`Class `LocatorsAndroidEspressoTest.java` was created because Espresso automation type is not yet supported on
LambdaTest as well as many other cloud platforms. Hence, this class will execute the test on local Android emulator.### `LocatorsAndroidUiAutomatorTest.java`
This test class contains the tests for,
- `testByClassName`
- `testById`
- `testByUiSelector`
- `testByXpath`### `LocatorsIOSTest.java`
This test class contains the tests for,
- `testByAccessibilityId`
- `testByClassChain`
- `testByPredicate`## How to run the tests?
You can run the tests by running the following command:
```bash
> mvn clean install
```You can also run from the IDE by opening `testng.xml` file and right-clicking on it and selecting `Run`.