1.0.0 • Published 4 years ago

taiko-screeny v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

taiko-screeny Node.js CI

A tool to capture screenshot on taiko actions

Installation

npm install taiko-screeny

Usage

const {
  openBrowser,
  closeBrowser,
  screeny: { write, goto, setConfig }
} = require('taiko');

const fs = require('fs');
const dir = 'screen-capture';
const assert = require('assert');

describe('Capture screenshot for every action', async () => {
  beforeEach('Before Launch', async () => {
    await openBrowser();
  });

  afterEach('Close Browser', async () => {
    await closeBrowser();
  });
  it('Should be capturing screenshots for actions', async () => {
    await setConfig(dir);
    await goto('google.com');
    await write('Taiko.js');
    assert.equal(fs.readdirSync(dir).length, 2);
  });
});

setConfig Command

setConfig(directoryName);