Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Boilerplate project to help get webdriverIO running on Roku devices

Notifications You must be signed in to change notification settings

AntonKostenko/webdriverIO-roku-appium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roku Webdriver Automation Using WDIOv7, Appium, and Mocha

End-to-end Roku tests using webdriver.io.

Resources

This is possible thanks to the amazing effort done by @dlenroc and the appium roku driver he created. Check out his github for an in-depth look at the driver.

Running locally

  1. Install dependencies and set config
    $ npm install -g appium@next
    $ yarn install
    $ appium driver install --source npm @dlenroc/appium-roku-driver
  2. Set device appium:ip, appium;password in tests/wdio.conf.ts, and appium:app.
  3. Run tests
    $ yarn wdio

Running specific tests

To run specific tests, use the --spec option with the files you want to test:

$ yarn wdio --spec login.spec.ts

Contexts

There are 2 contexts that are supported:

  1. ECP (default) External Control Protocol is a context that finds elements quickly, but can report incorrect element coordinates and does not see many attributes.

  2. ODC On Device Component is a context that sees all attributes and reports coordinates relative to the viewport (can be tuned using elementResponseAttributes setting). This has a lot more info but is much slower.

Locators

The roku webdriver supports several location strategies: id, tag name, link text, partial link text, css selector and xpath .

A semi-efficient way to find these elements is by using the Appium Inspector. Once the tool is installed launch Appium:

$ appium

and configure the inspector with the required capes:

{
  "platformName": "roku",
  "appium:automationName": "roku",
  "appium:deviceName": "<deviceName",
  "appium:app": "<path-to.zip>",
  "appium:ip": "<roku-ip>",
  "appium:password": "<roku-dev-password>",
  "appium:context": "ECP" // optional
}

More optional capes can be found in the roku driver repo.

Elements can also be found by looking directly at the app-ui endpoint in a browser. ECP - 'roku-ip-address:8060/query/app-ui' or ODC - 'roku-ip-address:8061/app-ui'

Once the element(s) is/are found they can be used with the Webdriver.io query commands: Some examples:

await $('*=driver')
await $$('//body/p[2]')
await $('#someid')

About

Boilerplate project to help get webdriverIO running on Roku devices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published