Test your application with selenium easily, without too much cofiguration and without having to install any drivers.
# Using npm
npm install --save selenium-test-core
firefox
firefox:headless
chrome
chrome:headless
ie
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