Taiko
Documentation

Home

writing plugins

Taiko features can be extended via plugins which can allow users to take more advantage of ChromeDevtoolsProtocol when core Taiko concentrating on functionalities around UI automation tests. It can also help users simplify their workflow. Below are a few scenarios where plugins can help extending taiko:

Conventions

capability:[‘subcommands’]` - in plugins package.json 

Only if the package.json has the above capability added taiko will consider it to be a subcommand.

Plugin Workflow

Taiko plugin workflow

Example:

const { openBrowser, goto, write, press, closeBrowser , inputField, into, screencast} = require('taiko');

(async () => {
    try {
         await openBrowser();
	   await screencast.start();	
         await goto('google.com');
         await write('taiko', into(inputField()));
         await press('Enter');
   } catch (e) {
        console.log(e);
  } finally {
        await closeBrowser();
        await screencast.stop(); 
  }
})();

Running scripts with plugins

Execution capability in plugin

Example: taiko diagnostics http://gauge.org

Examples