[skip ci] update device script
This commit is contained in:
1 parent
173e6ffa6c
commit
a1c178830a
2 files changed
+54
No files matched your search
@@ -71,6 +71,7 @@
|
|||||||
"registry:read": "node tools/registry.js --output registry.json",
|
"registry:read": "node tools/registry.js --output registry.json",
|
||||||
"registry:clear": "node tools/registry.js --clear",
|
"registry:clear": "node tools/registry.js --clear",
|
||||||
"restart-app": "node tools/restart-app.js",
|
"restart-app": "node tools/restart-app.js",
|
||||||
|
"check-for-updates": "node tools/check-for-updates.js",
|
||||||
"shutdown": "node tools/shutdown.js"
|
"shutdown": "node tools/shutdown.js"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
// Check for updates on Roku device
|
||||||
|
|
||||||
|
const rokuTestAutomation = require('roku-test-automation');
|
||||||
|
const ecp = rokuTestAutomation.ecp;
|
||||||
|
const utils = rokuTestAutomation.utils;
|
||||||
|
const Key = rokuTestAutomation.ECP.Key;
|
||||||
|
|
||||||
|
const getEnvVars = require('./get-env-vars');
|
||||||
|
|
||||||
|
const config = getEnvVars(['ROKU_DEV_TARGET']);
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
utils.setupEnvironmentFromConfig({
|
||||||
|
RokuDevice: {
|
||||||
|
devices: [{
|
||||||
|
host: config.ROKU_DEV_TARGET,
|
||||||
|
password: ''
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Go to the home screen
|
||||||
|
await ecp.sendKeypress(Key.Home);
|
||||||
|
await utils.sleep(2000);
|
||||||
|
await ecp.sendKeypress(Key.Home);
|
||||||
|
await utils.sleep(2000);
|
||||||
|
|
||||||
|
// Settings menu
|
||||||
|
await ecp.sendKeypress(Key.Up);
|
||||||
|
await utils.sleep(500);
|
||||||
|
await ecp.sendKeypress(Key.Right);
|
||||||
|
await utils.sleep(500);
|
||||||
|
|
||||||
|
// System
|
||||||
|
await ecp.sendKeypress(Key.Up);
|
||||||
|
await utils.sleep(500);
|
||||||
|
await ecp.sendKeypress(Key.Right);
|
||||||
|
await utils.sleep(500);
|
||||||
|
|
||||||
|
// Software update
|
||||||
|
await ecp.sendKeypress(Key.Up);
|
||||||
|
await utils.sleep(500);
|
||||||
|
await ecp.sendKeypress(Key.Up);
|
||||||
|
await utils.sleep(500);
|
||||||
|
await ecp.sendKeypress(Key.Up);
|
||||||
|
await utils.sleep(500);
|
||||||
|
await ecp.sendKeypress(Key.Right);
|
||||||
|
await utils.sleep(2000);
|
||||||
|
|
||||||
|
// Check for updates
|
||||||
|
await ecp.sendKeypress(Key.Ok);
|
||||||
|
await utils.sleep(500);
|
||||||
|
})();
|
||||||
Reference in new issue
Block a user