Skip to content

Smartphone App Testing with Botium

Testing chatbots embedded into a Smartphone App is possible with the Botium Webdriver Connector - in fact, thanks to Appium it is technically and practically pretty much the same as testing a chatbot embedded into a website.


This is not an Appium tutorial. If you never used Appium before, stop reading and build knowledge in Appium first.


You need a working Appium endpoint connected to a real or emulated device. You can either

  • install Appium and all required things on your local workstation or server (see for example these instructions)

  • use a virtualized Appium + Android environment like this

  • or you can connect to a device cloud provider with Appium support (like Perfectolabs or Saucelabs)

Furthermore, for the Smartphone App under test, you have to know:

  • For Android, the appPackage name and appActivity name


For following the steps below, you can use this chatbot app based on Alice.

Setup Steps

For testing a Smartphone App with Botium, you will have to find out about the internals of the App and tell Botium about the Appium element locators that are required for simulating a conversation with the chatbot:

  • where to enter the text to send to the chatbot and what button to click

  • where to look for the chatbot response

There are several tools available to do this, one of them is the Appium Desktop.

The view from the Smartphone app is mirrored, and you can interact with it. The elemenet attributes are shown as well. In this case, the locator for the text input box can be written like this:


A working botium.json will then look like this:

  "botium": {
    "Capabilities": {
      "PROJECTNAME": "WebdriverIO Appium Sample",
      "CONTAINERMODE": "webdriverio",
      "CLEANUPTEMPDIR": false,
        "capabilities": {
          "platformName": "Android"
        "port": 4723,
        "path": "/wd/hub"
      "WEBDRIVERIO_APP": "",
      "WEBDRIVERIO_APPPACKAGE": "com.hariofspades.chatbot",
      "WEBDRIVERIO_APPACTIVITY": "com.hariofspades.chatbot.MainActivity",
      "WEBDRIVERIO_INPUT_ELEMENT": "//*[@resource-id=\"com.hariofspades.chatbot:id/et_message\"]",
      "WEBDRIVERIO_INPUT_ELEMENT_SENDBUTTON": "//*[@resource-id=\"com.hariofspades.chatbot:id/btn_send\"]",
      "WEBDRIVERIO_OUTPUT_ELEMENT": "//*[@resource-id=\"com.hariofspades.chatbot:id/chatMessageView\" and name(./*[1])=\"android.widget.ImageView\"]",
      "WEBDRIVERIO_OUTPUT_ELEMENT_TEXT": ".//*[@resource-id=\"com.hariofspades.chatbot:id/text\"]",


You can find the full sample on Github

In Botium Box, the configuration looks like this:

Device Sets and Test Execution

There is no different than for running Selenium-based web tests in Botium Box. First, configure the connection to an endpoint - Appium, Selenium Grid, or one of the supported device cloud providers.

Then, configure the Device Set to tell Botium on which devices you want to run your tests on.

Finally, use this device set in the Quickstart Wizard when configuring an E2E Testing project.

When running a test session, all test cases are executed on all of the devices of the device set, and the test results show additional information and screenshots.