selenium-test-core
v1.0.8
Published
Make easy and simple a application selenium tests
Downloads
3
Maintainers
Readme
selenium-test-core
Test your application with selenium easily, without too much cofiguration and without having to install any drivers.
Installation
# Using npm
npm install --save selenium-test-core
Supported browsers
firefox
firefox:headless
chrome
chrome:headless
ie
Example
const {chooseUrlAndBrowser, takeScreenshot} = require('selenium-test-core');
(async() => {
try {
await chooseUrlAndBrowser(runTests);
} catch (err) {
process.exitCode = 1;
console.log(err);
}
})();
async function runTests(helpers) {
await helpers.start();
await takeScreenshot('welcome_page', helpers);
// 2000 is the time to wait for closing the browser
await helpers.close(2000);
}
# Using npm
npm start NAVIGATOR URL
# In headless
npm start NAVIGATOR:headless URL