1.0.1 • Published 2 years ago

selenium-wrapper-ed v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Selenium Wrapper

Selenium wrapper for the web common methods needed to automate a web application.

Install

npm install selenium-wrapper-ed

Usage

Once installed you have to import the Browser object-

import {Browser} from 'selenium-wrapper-ed'

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