Skip to main content

Testwizard for Web testobjects

Project description

Testwizard - Web

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

Usage

  • import the testwizard.core and the testwizard.web packages
  • get a sesion 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

Python (website.js)

import sys
import time

from testwizard.core import TestWizard
from testwizard.core import ResultCodes
from testwizard.web import Web

with TestWizard() as TW:
    session = TW.session

    website = Web(session, "TestwizardWebsite")

    print("startWebDriver")
    result = website.startWebDriver()
    print(result.message)
    if (not result.success):
        session.addFail(result.message)

    # Add your commands here

    print("quitDriver")
    result = website.quitDriver()
    print(result.message)
    if (not result.success):
        session.addFail(result.message)

    if (not (session.hasFails() or session.hasErrors())):
        session.setResult(ResultCodes.PASS, "Test was successful")

sidecar file (website.json)

{
    "tester": "Some tester",
    "parameters": [
        { "name": "param1", "value": "value1"},
        { "name": "param2", "value": "value2"}
    ],
    "resources": [{ "category": "WEB", "name": "TestwizardWebsite", "id": "Testwizard web site"}
    ],
    "outputFolder": "c:\\temp"
}

License

Testwizard licensing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for testwizard.web, version 3.1.8
Filename, size File type Python version Upload date Hashes
Filename, size testwizard.web-3.1.8-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size testwizard.web-3.1.8.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page