@testwizard/mobile

3.8.1 • Public • Published

Testwizard - Mobile

Javascript language support for testing Mobile devices using testwizard

npm (scoped) lerna

Usage

  • import the @testwizard/test and the @testwizard/mobile packages
  • get a session and use it to create a mobile 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

javascript (mobile.js)

'use strict';

const Testwizard = require("@testwizard/test");
const Mobile = require("@testwizard/mobile");

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

    console.log("-- Parameter usage ---");
    console.log("param1 = " + session.parameters.param1);
    console.log("param2 = " + session.parameters.param2);

    const mobile = await Mobile.create(session, "Mobile");

    let result = await mobile.initDriver();
    console.log(result.message);
    if (!result.success) {
        session.addFail(result.message);
        return;
    }

// Add your commands here

    result = await mobile.quitDriver();
    console.log(result.message);
    if (!result.success)
        session.addFail(result.message);

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

test();

sidecar file (mobile.json)

{
    "resources": [
        { 
            "category": "MOBILE", 
            "name": "Mobile", 
            "id": "Mobile 1"
        }
    ]
}

Compatibility

The version is compatible with testwizard version 3.7

License

Testwizard licensing

Dependencies (5)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @testwizard/mobile

    Weekly Downloads

    7

    Version

    3.8.1

    License

    See readme.md

    Unpacked Size

    47.5 kB

    Total Files

    3

    Last publish

    Collaborators

    • edtb