sweetdreams
v0.0.1
Published
UI testing how it should be
Downloads
1
Maintainers
Readme
Welcome to sweetdreams, UI testing as it should be.
Sweet dreams uses browser extensions to inject a script into the page under test.
Requirements
- node.js
- openssl
- Windows (see roadmap)
- "Google Chrome" or "Firefox" to be in path (see roadmap)
Usage
- Install the extension(s)
- Chrome
- Visit chrome://extensions/
- Switch developer mode on
- Load unpacked from ./extension
- Firefox
- Visit about:debugging
- Click "Load Temporary add-on"
- Choose any file in the ./extension directory
- Run specs...
const sweetdreams = require('sweetdreams');
sweetdreams.add('open', 'google.com');
sweetdreams.add('input', '[aria-label="Search"]', 'sweet dreams');
sweetdreams.add('click', '[type="submit"]');
sweetdreams.add('getTitle', (title) => {
console.log(title); => 'sweet dreams - Google Search';
});
sweetdreams.start({ browser: 'chrome' });
- You may need accept the insecure certs message
API
Roadmap
- Extend list of commands (viz. webdriverio)
- Automatically install extensions
- Automatically accept insecure certs
- Make cross-browser
- Make cross-platform
- Allow parallel testing
- Add test DSLs e.g. Gherkin
- Apply log levels
- Promisify API
- Make port and hostname settable
- Expose http api (to allow remote tests)