Skip to content

chenchaoyi/cyancat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Mobile JSON Wire Javascript binding - Write Appium test synchronously in Javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published