Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fernandospr/appium-tests-android-app-example
https://github.com/fernandospr/appium-tests-android-app-example
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/fernandospr/appium-tests-android-app-example
- Owner: fernandospr
- Created: 2023-12-21T19:28:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-21T20:32:12.000Z (about 1 year ago)
- Last Synced: 2024-11-08T10:50:44.378Z (2 months ago)
- Language: Kotlin
- Size: 104 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is the companion app for the [appium-tests-example](https://github.com/fernandospr/appium-tests-example) project.
## appium-tests-android-app-example
All screens contain at least one text field, a Set button and a Delete button. The view is bound to the `Item` class.
Clicking Set will set the value of the Item.
Clicking Delete will blank the value of the Item.
### How to run the app
1. Clone this repository.
2. Open it in Android Studio.
3. Run the app in a device/emulator.### Project content
* Android View Folder
* Single Item: shows a single item.
* Three Items: shows three items.
* Multiple Items: shows a hundred items using a `RecyclerView`.* Compose Folder
* Single Item: shows a single item.
* Three Items: shows three items.
* Multiple Items: shows a hundred items using a `LazyColumn`.### Repeated IDs
Using [Appium Inspector](https://github.com/appium/appium-inspector), inspect the screens containing more than an item, you'll notice the IDs are repeated.Check the [appium-tests-example](https://github.com/fernandospr/appium-tests-example) project to see a way to obtain the desired views despite the IDs are repeated.
### Compose considerations to enable Appium tests
Checking the code, you'll notice the following:
* Using `Modifier.semantics { testTagsAsResourceId = true }` in a container view.
* Using `Modifier.testTagWithPackage("some_id")` on each composable.These are necessary to enable Appium find the composables by ID.