taiko-screeny

1.0.0 • Public • Published

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);

Readme

Keywords

Package Sidebar

Install

npm i taiko-screeny

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

5.43 kB

Total Files

5

Last publish

Collaborators

  • saikris