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.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

Python (website.js)

from testwizard.test import TestWizard
from testwizard.test 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)
        exit()

    # 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)

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

Compatibility

The version is compatible with testwizard version 3.7

License

Testwizard licensing

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

testwizard.web-3.8.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

testwizard.web-3.8.1-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page