Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cfware/tap-selenium-manager
Selenium Manager for tap
https://github.com/cfware/tap-selenium-manager
Last synced: 29 days ago
JSON representation
Selenium Manager for tap
- Host: GitHub
- URL: https://github.com/cfware/tap-selenium-manager
- Owner: cfware
- License: mit
- Created: 2020-02-06T20:20:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-15T21:31:16.000Z (about 1 year ago)
- Last Synced: 2024-11-06T23:47:26.142Z (about 2 months ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @cfware/tap-selenium-manager [![NPM Version][npm-image]][npm-url]
Selenium Manager for tap
## Usage
```js
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);
```[npm-image]: https://img.shields.io/npm/v/@cfware/tap-selenium-manager.svg
[npm-url]: https://npmjs.org/package/@cfware/tap-selenium-manager