pl-aut-web-fw

PrinterLogic Automation Web Framework library is a selenium wrapper for the web common methods needed to automate a web application.

Usage no npm install needed!

<script type="module">
  import plAutWebFw from 'https://cdn.skypack.dev/pl-aut-web-fw';
</script>

README

PrinterLogic Automation Web Framework

PrinterLogic Automation Web Framework library is a selenium wrapper for the web common methods needed to automate a web application.

Install

npm install pl-aut-web-fw

Usage

Once installed you have to import the Browser object-

import {Browser} from 'pl-aut-web-fw'

Then you can use the methods available as promises in that object.

Example:

await Browser.openPage('https://edtesting.pi.service.pl-labs.com/')
await Browser.setValue('userName', 'user')
await Browser.setValue('passwordField', 'passcode')
await Browser.click('submit')

Remote selenium server

By default the browser is executed locally, but you can use the following environment variable to indicate the remote hub server. If this is empty or null it will execute locally.

SELENIUM_REMOTE_URL=<your selenium hub url>   // SELENIUM_REMOTE_URL=http://remotehub.com:4444

Unit Tests

There are unit tests for the methods in this repository. When you run the command

npm run test

The unit tests will run, and when they finish the test coverage will be shown.