Code Monkey home page Code Monkey logo

appium-locator-sample's Introduction

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.

export LT_USERNAME=<cloud-username>
export LT_ACCESS_KEY=<cloud-key>
export LT_APP_ANDROID=<proverbial-app-cloud-url>
export LT_APP_ANDROID_2=<api-demo-app-cloud-url>
export LT_APP_IOS=<proverbial-app-ios-cloud-url>

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:

> mvn clean install

You can also run from the IDE by opening testng.xml file and right-clicking on it and selecting Run.

appium-locator-sample's People

Contributors

wasiqb avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

jaffamonkey

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.