Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

NodeJS Appium Example Scripts

These demonstration scripts allow you to run an automated Appium tests on Sauce Labs platforms.


The code in these scripts is provided on an "AS-IS" basis without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement. These scripts are provided for educational and demonstration purposes only, and should not be used in production. Issues regarding these scripts should be submitted through GitHub. These scripts are maintained by the Technical Services team at Sauce Labs.

Some examples in this repository, such as appium-examples and headless-examples, may require a different account tier beyond free trial. Please contact the Sauce Labs Sales Team for support and information.


Environment Setup

  1. Set Global Dependencies

    $ brew install npm
    • Clone this repository into a directory of your choice.
    $ git clone
    • Navigate to the demo-js/appium-examples, and choose your desired framework + thewdio project version, for example:
    $ cd demo-js/wdio5/mocha-framework
  2. Set Sauce Credentials

    $ export SAUCE_USERNAME=<your Sauce Labs username>
    $ export SAUCE_ACCESS_KEY=<your Sauce Labs access key>

Running the Tests

  1. Choose and navigate to the desired test framework:
    • wdio4/mocha-framework
    • wdio5/mocha-framework
  2. Navigate to the desired directory:
    • for running tests on emulators and simulators: emusim
    • for running tests on real devices: rdc
  3. Resolve project dependencies and install packages (Use sudo if necessary)
    $ npm install
  4. Run the following command to run tests in Parallel:
    $ npm test
  5. Visit the Sauce Labs Dashboard to see the results.

Advice and Troubleshooting

There may be additional latency when using a remote webdriver to run tests on Sauce Labs, therefore timeouts or "Waits" may need to be increased. Please read the following wiki page on tips regarding explicit waits

More Information
You can’t perform that action at this time.