cyancat

0.1.0 • Public • Published

Cyancat

NPM version Build Status Dependency Status Downloads

Mobile JSON Wire Javascript binding, best for Appium native app test automation.

Cyancat let you write Appium mobile automation test in a synchronized way in Javascript:

  it('sample test for sign in', function(done) {
    driver.run(function() {
      driver.init({
        "platformName": "iOS",
        "platformVersion": "9.3",
        "deviceName": "iPhone 6",
        "app": "./app/example.app"
      });
      // add memo
      driver.clickEl('Add');
      driver.typeEl('memo test summary 1', 'itemTitle');
      driver.clickEl('Done');
 
      // delete memo
      driver.clickEl('//UIATableCell[@name = "memo test summary 1"]', 'xpath');
      driver.clickEl('Delete');
 
      done();
    });
  • Built-in element visibility check before any operation, no driver.sleep(1000) anymore
  • Easily config selenium protocol timeout
  • You just don't like method chaining style and would like to insert more complex stuff between actions
  • Convenience and well documented methods that are more human friendly than WD.js
  • The cyancat command line interface comes with a nice configuration utility that helps you to create your test framework in less than a minute.

Table of contents


Installation

$ npm install cyancat

API

stay tuned, more to come...

setWaitTimeout(timeout)

init(capabilities)

elements(locator, using)

element(locator, using)

elementClick(elementId)

clickEl(locator, using, timeout)

elementType(value, elementId)

typeEl(value, locator, using, timeout)

elementAttribute(elementId, attributeName)

source()

quit()

waitForElement(locator, using, timeout)

sleep(ms)


Example

A full test framework example including the app is available in the examples folder


Why the name

Because Cyancat uses Bluecat underlayer, and I expect tests written in Cyancat stay green...

License

Licensed under the MIT

Package Sidebar

Install

npm i cyancat

Weekly Downloads

10

Version

0.1.0

License

MIT

Last publish

Collaborators

  • chaoyi.chen