Skip to content

Latest commit

 

History

History
100 lines (68 loc) · 3.21 KB

README.md

File metadata and controls

100 lines (68 loc) · 3.21 KB

Macaca WD Client

Gitter Chat NPM version build status node version

Macaca WD Client is inspired by admc/wd, according to W3C WebDriver Spec.

Installation

$ npm i macaca-wd --save-dev

Documentation

Usage

var wd = require('macaca-wd');

var remoteConfig = {
  host: 'localhost',
  port: 3456
};

var driver = wd.promiseChainRemote(remoteConfig);

before(function() {
  return driver.init({
    platformName: 'desktop', // iOS, Android, Desktop
    browserName: 'chrome'    // Chrome, Electron
    app: path/to/app         // Only for mobile
  });
});

after(function() {
  return driver
    .sleep(1000)
    .quit();
});

it('#1 should', function() {

  ...

});

...

Mixin Helper

import wd from 'macaca-wd';
import {
  extendsMixIn,
} from 'macaca-wd/lib/helper'

extendsMixIn(wd)

see more about helper

Extend WD chain

import wd from 'macaca-wd';

wd.addPromiseChainMethod(name, method);

API

Demo

Macaca Getting Started

Contributors


xudafeng


ziczhu


meowtec


jsw0528


zhangyuheng


tsj1107


kobe990


zhuyali

This project follows the git-contributor spec, auto upated at Sat Apr 21 2018 17:47:42 GMT+0800.