Get up and running with Appium on mobile in no time.
$ cd into/this/repo
$ npm install
- Appium
- ChromeDriver + add it to your
PATH
- A saucelabs.com account
__ To run locally: __
Make sure you have one or more Android device(s) connected to your computer. Below are some tests you can run.
__ To run on saucelabs.com: __
Make sure you create a relevant blah.json
file under tests/
. See the sauce under one of the tests/sauce-*.js
files to see what fields this JSON file should have.
If running remotely, it's pretty important to set the version
parameter to match the Android version you are targeting (this is inside the browser.init
call). You can also set device-orientation
to either landscape
or portrait
, as well as device-type
to either phone
or tablet
.
This one runs through and asserts basic things about my website in Chrome.
Make sure the device you have connected is rooted!
$ node tests/android-chrome.js
This test clicks around inside an Android ContactManager native app. This does not require that the device is rooted. This test requires Android 4.2 or newer.
To run locally:
$ node tests/android-native.js
.. or to run on Saucelabs.com:
$ node tests/sauce-uiautomator.js
Locally, do
$ node tests/android-stock.js
.. or to run on Saucelabs.com:
$ node tests/sauce-webdriver.js
Locally, do
$ node tests/android-selendroid.js
.. or to run on Saucelabs.com:
$ node tests/sauce-selendroid.js
Connect two (or more) Android devices to your computer. Edit the appium
variable on line 9 to point to the location of your cloned Appium repository.
Then!
$ node multidroid.js
This test will detect which Android device(s) connected to your computer are rooted and which are not, and will deploy either a Chrome test (to rooted devices) or a native application test (to non-rooted devices).