node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

@frames/automator

Morphis Frames Automator

Install

$ npm i @frames/automator

Usage

$ automator --help
Frames Automator v2.0.13
 
Usage: automator [options] [configFile]
config file defaults to frames.conf.js.
 
Options:
  --help, -h     prints automator help menu
  --version, -v  prints automator version
  --dir, -d      automator tests directory

Example

import frames from '@frames/automator';
  
describe('Starts, Login and Opens a Task', () => {
    before(() => {
        frames.login()
            .assert(frames.Validations.isActive('BLOCK', 'FIELD'), 'active item is not BLOCK.FIELD');
    });
    it('Open and Exit Task', () => {
        frames.openTask('TASK_NAME')
            .navigate('BLOCK1', 'FIELD')
            .value('123').next()
            .navigate('BLOCK2', 'EXECUTE_BTN')
            .closeTask()
    });
});

Selenium Testing

Local

Download Selenium Standalone Server and started locally.

You will need the browser driver also. To get chrome working just download the latest version of ChromeDriver.

java -Dwebdriver.chrome.driver=/Users/kimus/Downloads/chromedriver \
     -jar ~/Downloads/selenium-server-standalone-3.4.0.jar

Docker

Using the Selenium Docker project to provide a local Selenium standalone server hub and node configurations with Chrome and Firefox.

$ docker run -d --name selenium -p 4444:4444 selenium/standalone-chrome

To stop container:

$ docker stop selenium

To start the container again:

$ docker start selenium

Maintainers

For start developing in Frames Automator you will need to start the watch process in a terminal for building the javascripts on write like this:

$ npm run watch

If you change the root index.js you will need to build it like this:

$ npm run compile:index

Testing

../bin/automator -d sample <configFile>