@testwizard/smart-tv
v3.8.1
Published
> Javascript language support for testing smart-TV devices using testwizard
Downloads
20
Readme
Testwizard - Smart-TV
Javascript language support for testing smart-TV devices using testwizard
Usage
- import the @testwizard/test and the @testwizard/smart-tv packages
- get a session and use it to create a smart-TV 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 (smart-tv.js)
'use strict';
const Testwizard = require("@testwizard/test");
const SmartTV = require("@testwizard/smart-tv");
async function test() {
const session = await Testwizard.createSession();
const smartTV = await SmartTV.create(session, "SmartTv");
console.log("sendRCKey");
let result = await smartTV.sendRCKey("menu");
console.log(result.message);
if (!result.success)
session.addFail(result.message);
if (!(session.hasFails || session.hasErrors))
session.addPass("Test was successful");
}
test();
sidecar file (smart-tv.json)
{
"tester": "John Smith",
"parameters": [
{ "name": "param1", "value": "value1"},
{ "name": "param2", "value": "value2"}
],
"resources": [
{ "category": "SMART_TV", "name": "SmartTv", "id": "TV Model 1"}
],
"outputFolder": "c:\\temp"
}
Compatibility
The version is compatible with testwizard version 3.7