3.0.0 • Published 7 months ago

@cfware/tap-selenium-manager v3.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
7 months ago

@cfware/tap-selenium-manager NPM Version

Selenium Manager for tap

Usage

import {testBrowser, grabImage} from '@cfware/tap-selenium-manager';
import t from 'libtap';

import startHTTPD from './your-httpd-server.js';

const pages = {
	async 'page1.html'(t, selenium) {
		// Use `selenium` to control the browser and `t` to perform
		// assertions on the results.
		const element = await selenium.findElement({id: 'image'});
		t.matchSnapshot(await grabImage(element));
	}
};

async function main() {
	const baseURL = await startHTTPD();
	if (await testBrowser(t, 'firefox', baseURL, pages)) {
		console.log('Firefox tests ran');
	}
	if (await testBrowser(t, 'chrome', baseURL, pages)) {
		console.log('Chrome tests ran');
	}
}

main().catch(t.error);
3.0.0

7 months ago

2.0.0

2 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago