sweetdreams

0.0.1 • Public • Published

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

  1. 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
  1. 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' });
  1. 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)

Package Sidebar

Install

npm i sweetdreams

Weekly Downloads

0

Version

0.0.1

License

BSD

Unpacked Size

20.8 kB

Total Files

14

Last publish

Collaborators

  • bowcot84