@testwizard/web

3.7.1 • Public • Published

Testwizard - Web

Javascript language support for testing websites, web-apps or webservices using testwizard

npm (scoped) lerna

Usage

  • import the @testwizard/test and the @testwizard/web packages
  • get a session and use it to create a web testobject.
  • Use this object to execute commands You can use the session to add results that will be reported to the robot when the script finishes or set results that will be posted immediately.

Sample script

javascript (website.js)

'use strict';

const Testwizard = require("@testwizard/test");
const Web = require("@testwizard/web");

async function test() {
    const session = await Testwizard.createSession();

    const website = await Web.create(session, "TestwizardWebsite");

    console.log("startWebDriver");
    let result = await website.startWebDriver();
    console.log(result.message);
    if (!result.success)
        session.addFail(result.message);

    if (!(session.hasFails || session.hasErrors))
        session.addPass("Test was successful");
}

test();

sidecar file (website.json)

{
    "resources": [
        { 
            "category": "WEB", 
            "name": "TestwizardWebsite", 
            "id": "Testwizard web site"
        }
    ]
}

Compatibility

The version is compatible with testwizard version 3.7

License

Testwizard licensing

Package Sidebar

Install

npm i @testwizard/web

Weekly Downloads

5

Version

3.7.1

License

See readme.md

Unpacked Size

49.2 kB

Total Files

3

Last publish

Collaborators

  • edtb