taiko-screeny
v1.0.0
Published
A tool to capture screenshot for every taiko action
Downloads
3
Readme
taiko-screeny
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);