Skip to content
QiTASC.com / UI Steps Language /
UI Steps and Apptest Configuration
/ .. /
UI Steps and Apptest Configuration





UI Steps and Apptest Configuration

The following section contains UI Steps and Apptest configurations.

  • UI Steps requires Selenium, which is included with intaQt.

  • Apptest requires either Selenium or Appium. Appium may be installed via the QiTASC Cockpit

In order to use the UI Steps, the following must also be configured:

UI Steps- and Apptest-specific configurations, as well as APK information are available below.

Contents
Supported Browsers
Selenium Configuration
Apptest Configuration
Appium Configuration
AppTest - App-Specific Configurations

Supported Browsers

UI Steps is supported by the following browsers:

  • Firefox

  • Chrome

  • Internet Explorer

  • Microsoft Edge

Selenium Configuration

Syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Selenium = {
    iePath = <String>
    chromePath = <String>
    chromeOptions = [<String>, ...]
    firefoxPath = <String>
    fireFoxOptions = [<String>, ...]
    firefoxProfilePath = <String>
    apksPath = <String>
    edgePath = <String>
    edgeOptions = [<String>, ...]
}

Parameters

  • iePath - The path to the Selenium driver for Internet Explorer
  • This may be in the intaQt configuration or a project's configuration file

  • chromePath - The path to the Selenium ChromeDriver

  • This may be in the intaQt configuration or a project's configuration file

  • chromeOptions (Optional) - A comma-separated list of Chrome browser options, for example, "incognito"

  • firefoxPath - The path to the Firefox GeckoDriver

  • firefoxOptions (Optional) - A comma-separated list of Firefox browser options, for example, "-private"

  • firefoxProfilePath (Optional) - The path to the Firefox profile

  • The custom profile path can be obtained in the Firefox Profile Manager

  • apksPath - The path to where APKs (Android application packages) are stored

  • If the path is reconfigured while running intaQt, the Selendroid service will shut down and relaunched on demand

  • edgePath - The path to the Selenium driver for Edge

  • edgeOptions (Optional) - A comma-separated list of Edge browser options

Example - Global Path to Geckodriver on an Ubuntu Operating System

1
2
3
4
Selenium = {
    firefoxPath = "/home/User/webdrivers/GeckoDriver"
    firefoxOptions = ["-private"]
}

Example - Windows with ChromeDriver As shown in the example below, the ChromeDriver's file path is set with forward slash characters. The associated global Windows folder path evaluates to C:\QiTASC\webdrivers\.

1
2
3
4
Selenium = {
    chromePath = "/QitASC/webdrivers/chromedriver.exe"
    chromeOptions = ["incognito", "start-maximized"]
}
Note: If using a Windows machine, the global path can be defined by using double back slash characters, for example, firefoxPath : "C:\\QitASC\\webdrivers\\GeckoDriver.exe". This procedure is not recommended by intaQt.

Mac OS with GeckoDriver and ChromeDriver Example

1
2
3
4
5
6
Selenium = {
    firefoxPath = "/Users/testteam/QiTASC/GeckoDriver"
    firefoxOptions = ["-private"]
    chromePath = "/Users/testteam/QiTASC/chromedriver"
    chromeOptions = ["incognito", "start-maximized"]
}

Error Messages

Note: If an incorrect path is in the Selenium configuration file, intaQt will not start and an error message will be created in the QiTASC/intaqt/logs/intaqt.log file.

intaqt.log Error Message Example

1
2
3
2017-01-17 00:00:00,004 ERROR | main | intaqt.a                      | configure error
java.lang.RuntimeException:
  * Selenium.firefoxPath: file doesn't exist "/home/User/WrongDirectory/TypoGeckoDriver"

Apptest Configuration

Appium or Selendroid must be enabled to execute Apptests:

  • Selendroid is activated by default when running intaQt. To deactivate it and use Appium instead, refer to the configuration below.

  • The Android Package Kits (APKs) for the application under test must also be configured. Additional information about APKs is available in APK Management.

Appium Configuration

The following configuration activates Appium. Activating the Appium configuration will disable Selendroid.

Important! If Appium is being started on the intaQt Phone Service, an additional Appium configuration must be set separately in the intaQt Phone Service configuration file. The Appium block in the intaQt Phone Service configuration must define the isActive parameter and, optionally, the libraryPath parameter.

Syntax

1
2
3
4
Appium {
    isActive    = <Boolean>
    libraryPath = <String>
}

Parameters

  • isActive -
  • true enables the Appium plugin and disables Selendroid
  • false otherwise

  • libraryPath (Optional) - Path to the Appium library

  • By default, this will point to the Appium library created by the QiTASC Cockpit

Example

1
2
3
4
Appium {
    isActive = true
    libraryPath = "../../appium"
}

AppTest - App-Specific Configurations

The AppTest block enables setting app-specific configurations at the project level as well as server ports.

Syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
AppTest {
    driverCreationWaitMilliseconds = <Number>
    portRange {
        min = <Number>
        max = <Number>
    }
    apps = [
        {
            name = <String>
            path = <String>
            capabilities = <Map<String, Any>>
        },
        ...
    ]
}

Parameters

  • driverCreationWaitMilliseconds - The number of milliseconds to wait for driver creation for App testing
  • Default is set to 100000

  • portRange - The available port range for the Apptesting server

  • Default range is set to [1024, 65535]

  • min - The lowest available port

  • Should be greater or equal to 1024

  • max - The highest available port

  • Should be lower or equal to 65535

  • apps - Contains app-specific configurations:

  • name - The name of the app.

    • Important! This information will be used by the steps in test cases that refer to this app
  • path - The path to the apk file

  • capabilities (Optional) - The optional map of capabilities used to specify the way the automation session should behave

    • For more information, refer to the Appium Github documentation
    • The newCommandTimeout capability should be used if the app should be idle for an amount of time
    • By default, newCommandTimeout is set to 0, which disables closing idle sessions

Important!

  • Special attention must be paid to XPaths in case of migrating existing Selendroid tests to Appium, as the XPaths are different for Appium.

  • Android SDK's uiautomatorviewer can be used to find XPaths. It is normally located at $ANDROID_HOME/tools/bin/uiautomatorviewer

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
AppTest {
    driverCreationWaitMilliseconds = 100000
    portRange {
        min = 1024
        max = 65535
    }
    apps = [
        {
            name = "My App"
            path = "/Users/QiTASC/MyApps/"
            capabilities {
                platformVersion = "10.3.1"
                appWaitActivity = "com.qitasc.app/MyStartActivity"
            }
        },
        ...
    ]
}