0.1.1 β€’ Published 3 years ago

appium-roku-driver v0.1.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

πŸš€ Appium Roku Driver

NPM version Downloads

Appium Roku Driver is a test automation tool for Roku devices. Appium Roku Driver automates Roku applications, tested on real devices. Appium Roku Driver is part of the Appium test automation tool.

Installation

In order to use appium-roku-driver, we need to use appium version 1.16.0 or higher

npm i -g appium-roku-driver

πŸš€ Usage

Import Roku Driver, set and create a session:

import { RokuDriver } from "appium-roku-driver";

let capabilities = {
  app: "/Users/my-computer/3_Grid.zip",
  deviceName: "Home",
  appId: "dev",
  platformName: "Roku",
  contentId: "MV005011860000",
  mediaType: "season",
  ip: "10.10.1.1",
  username: "rokuUser",
  password: "rokuPass",
};

let driver = new RokuDriver();
await driver.createSession(capabilities);

πŸš€ Capabilities

Desired capabilities (caps) are a set of keys and values (i.e., a map or hash) sent to the Appium server to tell the server what kind of automation session we’re interested in starting up. There are various capabilities that can modify the behavior of the server during automation.

CapabilityMandatory FieldsDescription
appβœ…The absolute local path or remote http URL to a .zip1
appIdβœ…The appId is the identification for (channel / app) inside the OS
deviceNameβœ…The kind of device to use1
platformNameβœ…Platform target will be automated1
contentIdβœ…Partner defined unique identifier for a specific piece of content2
mediaTypeβœ…Parameter to give context to the type of contentID passed2
ipβœ…Ip of the device on which the automation will be executed
usernameβœ…Username of device3
passwordβœ…Password of device3
noResetπŸ”²Don't reset app state before this session. See in the osicial documentation of Appium for more details4
fullResetπŸ”²Perform a complete reset. See in the osicial documentation of Appium for more details4
newCommandTimeoutπŸ”²How long (in seconds) Appium will wait for a new command from the client before assuming the client quit and ending the session1

1 Appium Desired Capabilities

2 Developer environment setup

3 Developer environment setup

4 Reset Strategies

πŸš€ Commands

Session

These commands are used for session administration.

createSession(capabilities);
deleteSession();
validateDesiredCaps(capabilities);

Actions

These commands are used for actions administration.

getPageSource();
getScreenshot();

App Managment

These commands are used for application administration.

isAppInstalled(appId);
appsInstalled();
findAppInstalled(appId);
isCheckVersion(app, appId);
activateApp(appId, contentId, mediaType);
removeApp(appId);
terminateApp(appId);
installApp(app, username, password);
launchApp(appId, contentId, mediaType);
closeApp();
isStartedApp(appId);
isAppActivated(appId);
background(seconds);

General

getDeviceTime();
sendKey(key);
pressHardwareKey(key);
back();
isKeyboardShown();
hideKeyboard();