Taiko
Browser automation simplified.
Getting started
Command Line Interface
npm install -g taiko
On Windows, make sure that the location %AppData%\npm
(or wherever npm
ends up installing the module on your Windows flavor) is present in PATH
environment variable.
On Linux, install taiko
to a NODE_PATH
with executable permission.
As a Module
npm install taiko --save
Usage
Command line
Use the Read–eval–print Loop to record a script.
$ taiko
> openBrowser()
✔ Browser and page initialized
> goto('https://getgauge.io')
✔ Navigated to url "https://getgauge.io/"
> click('Get Started')
✔ Clicked element containing text "Get Started"
> .code
const { browser, openBrowser, goto, click, closeBrowser } = require('taiko');
(async () => {
try {
await openBrowser();
await goto('https://getgauge.io');
await click('Get Started');
} catch (e) {
console.error(e);
} finally {
if (browser()) {
closeBrowser();
}
}
})();
> .code code.js
Running a taiko script
$ taiko code.js
As a Module
const { openBrowser, goto, click, closeBrowser } = require('taiko');
(async () => {
await openBrowser();
await goto('https://getgauge.io');
await click('Get Started');
await closeBrowser();
})();
Documentation
Talk to us
The Gauge team maintains taiko. Reach out to us at the same forums for questions.