Appium integration

Suitest allows users to run the tests written in Appium on Suitest supported platforms.

Beta version

Please note that the current Appium integration is in Beta version. Therefore some of the features may not work as expected.

Prerequisites

Starting with integration

  1. Prepare the following information from Suitest

  2. Adjust your configuration file. Add or modify there the following lines:

    "hostname": "the.suite.st",
    "path": "/api/public/v4/wd/hub",
    "protocol": "https",
    "port": 443,
    
  3. Open your Appium project and insert the following capabilities

    "capabilities": {
        "platformName":"chosen platform",
        "browserName":"my string",
        "appium:automationName":"suitest",
        "suitest:tokenId":"your token ID",
        "suitest:tokenPassword":"your token password",
        "suitest:deviceId":"your device ID",
        "suitest:appConfigId":"your app configuration ID"
    }
    

    Where:

  4. Execute your Appium project

Supported commands

HTML based platforms only

The table below displays the support of commands as planned for the final version. At the moment, commands are fully supported only on HTML based platforms. Support on other platforms is currently only partial and will be finished one by one in the following months.

HTML based platforms:

  • Android - WebView apps
  • Browsers
  • HbbTV / Freeview Play
  • LG webOS / Netcast
  • Philips NetTV
  • Playstation 4/5
  • Samsung Tizen / Orsay
  • Xbox One - HTML apps
  • Other Smart TVs and STBs - HTML apps

Pressing VRC/keyboard buttons

When running your Appium tests on devices in Suitest, you need to control the device. Suitest has several ways to send key/button presses to your devices depending on a platform.

Platform VRC Presses Sending text to app Sending text to element
Android ✓ (text only) ✓ (as sendText)
HbbTV - ✓ (as setText)
HTML based - ✓ (as setText)
iOS - ✓ (as setText)
PlayStation - ✓ (as setText)
Roku ✓ (text + Enter button) ✓ (as sendText)
Roku Lite ✓ (text + Enter button) -
Tizen ✓ (text only) ✓ (as setText)
Webos - ✓ (as setText)
Websites - ✓ (complete keyboard) ✓ (as sendText)
Xbox - ✓ (as setText)

Button codes to be used for VRC Presses can be found as Unicode values in the constants section of our user documentation. Besides that, you need to use the value of id equal to VRC. See an example below:

[
    {
        "type": "key",
        "id": "VRC",
        "actions": [
            {"type": "keyDown", "value": "\uE501",}
        ] 
    }
]

Opening the application

The way of application opening depends on the platform. Examples in the sections below are written in JavaScript.

Testing on mobile devices

When testing on mobile devices in Suitest, you can open your application using Launch App command.

await driver.launchApp();

Testing on other devices

When testing on non-mobile devices in Suitest, you can open your application using Go To URL command. This command has one string argument, which should always equal to suitest:openapp value.

await driver.get("suitest:openapp");

The list of other supported commands

Command type Command name Supported on platforms
- Status all
Session Create New Session all
Session End Session all
Session Get Session Capabilities all
Session Take Screenshot see here
Session Set Orientation see here
Device Close an App see here
Element Clear Element see here
Element Click (on element) see here
Element Find Element HTML based platforms *
Element Get Tag Name HTML based platforms *
Element Get Element Attribute HTML based platforms *
Element Get Element CSS Value HTML based platforms *
Element Get Element Location HTML based platforms *
Element Get Element Rect HTML based platforms *
Element Get Element Size all
Element Get Element Text all
Element Is Element Displayed HTML based platforms *
Element Is Element Enabled HTML based platforms *
Element Is Element Selected HTML based platforms *
Interaction / Mouse Click (on coordinates) see here
Interaction / Touch Long Tap see here
Interaction / Touch Tap see here
Web / Navigation Get URL HTML based platforms *
Web / Navigation Go Back Browsers only
Web / Navigation Go Forward Browsers only
Web / Navigation Go to URL HTML based platforms *
Web / Navigation Refresh Browsers only