kunlun
v0.2.12
Published
An Appium JS mobile app automation framework
Downloads
22
Readme
Kunlun
Kunlun
is a Appium client library that provides:
- User friendly and more helpful methods in addition to WD
- Appium logging control through environment variable
DEBUG
- Sauce Labs integration
- Bootstrap your Appium page object test structure
Table of contents
Quick example:
- Instead of
- find an element by some selector
- write your own logic to wait for it to be available
- click on it
you can just call clickEl()
with Kunlun.
Default selector type is accessibility id
, you can overwrite it with xpath
, -ios uiautomation
, etc
- Print out Appium client side logging while running the test, just append
DEBUG=true
in command line
This package is still under construction, more are coming.
API
waitTillAvailable(selector, by)
Wait until specific element is displayed
waitTillNotAvailable(selector, by)
Wait until specific element is NOT displayed
typeSpecialKey(key)
Send special key as defined in https://github.com/admc/wd/blob/master/lib/special-keys.js
e.g.: driver.typeSpecialKey('Return');
clickEl(selector, by)
Click on selected element after waiting for it to be displayed
typeEl(value, selector, by)
Type text value in selected element after waiting for it to be displayed
getEls(selector, by)
Search for multiple elements after waiting for any of them to be displayed
getEl(selector, by)
Search for element after waiting for any of them to be displayed
hasEl(selector, by)
Check if an element exists
getElAttribute(attr, selector, by)
Get the value of an element's attribute after waiting for it to be displayed
bindModule(module)
Bind functions from customized page object modules to AppiumDriver object
resetModules()
Clean up customized page object modules functions
goBack()
Click on built-in Back button
cancelLastMove()
Click on built-in Cancel button
Plus, all the APIs as listed in WD
Command line tool
Kunlun comes with a kunlun
command line interface that helps you to create a basic page object Appium test framework.
$ npm install kunlun
$ ./node_modules/.bin/kunlun init
Follow the instructions and it will create a scaffold of basic test framework for you.
License
Licensed under the MIT