Macaca WD
Node.js WebDriver Client for Macaca
Introduction
Macaca is an open-source automation test solution for native, hybrid, mobile web and web application on mobile and desktop platforms.
# Installation
$ npm i macaca-wd -D
# Usage
const wd = require('macaca-wd');
const remoteConfig = {
host: 'localhost',
port: 3456
};
var driver = wd.promiseChainRemote(remoteConfig);
before(function() {
return driver.init({
platformName: 'desktop', // iOS, Android, Desktop, Playwright
browserName: 'chrome', // chromium, firefox, webkit
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)
# Extend WD chain
import wd from 'macaca-wd';
wd.addPromiseChainMethod(name, method);