@testwizard/web
v3.8.1
Published
> Javascript language support for testing websites, web-apps or webservices using testwizard
Downloads
26
Maintainers
Readme
Testwizard - Web
Javascript language support for testing websites, web-apps or webservices using testwizard
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