Is there way to set ANDROID_DRIVER / IOS_DRIVER without GUI?

How to set Remote Mobile Driver programmatically in Katalon (ANDROID_DRIVER / iOS / BrowserStack)?

We have one shared repository for both Android and iOS mobile tests. Our GitHub runner decides at runtime which platform will run.

What I need:
• For Android: Remote execution using Appium with ANDROID_DRIVER, and connection to a local Appium server.
• For iOS: Remote execution using BrowserStack.

The problem:
If I manually configure the following in the GUI:

Project → Settings → Desired Capabilities → Remote →
Remote Web Server Type = Appium
Remote Mobile Driver = ANDROID_DRIVER

…then everything works.

But if these fields are not set in the GUI, Katalon fails immediately with:

NullPointerException: Name is null

Katalon seems to require that the “Remote Mobile Driver” dropdown (e.g. ANDROID_DRIVER) is set manually in the GUI first. Otherwise it cannot start the driver even if I pass desired capabilities programmatically.

What I already tried:
• Setting desired capabilities in code
• Passing desired capabilities using -desiredCapabilities=””
• Changing remoteWebDriverType in CLI
• Switching values through GlobalVariables

Katalon ignores all of this unless the GUI dropdown is set.

My questions:

  1. Is there any way to set remoteMobileDriver (for example ANDROID_DRIVER) programmatically via CLI? Something like:
    -remoteWebDriverType=Appium
    -remoteMobileDriver=ANDROID_DRIVER
  2. Is it possible to use remote Appium together with:
    -browserType=“Android”
    so that Katalon selects the correct mobile driver without needing the GUI dropdown?

Goal:
I need a reliable way to dynamically switch between Android (local Appium) and iOS (BrowserStack) in CI/CD without manually setting anything in the GUI.

Thanks.

1 Like

hi @jkudrna
you can try this workaround,
use execution properties file instead of GUI settings

create a .execution folder in your project and add a default.properties file

remoteWebDriverType=Appium
remoteMobileDriver=ANDROID_DRIVER
appiumServerUrl=http://localhost:4723/wd/hub

then in your CI/CD, you can swap this file or modify it before running tests.
or try this in your CLI command

katalon -runMode=console \
  -remoteWebDriverType=Appium \
  -remoteWebDriverUrl="http://localhost:4723/wd/hub" \
  -browserType="Android"

for switching between Android and iOS dynamically you can try to do this

  1. create two execution profiles, Android and iOS
  2. use GlobalVariables to store the driver config
  3. run with: -executionProfile="Android" or -executionProfile="iOS"

inside each profile, set the appropriate driver settings
The NullPointerException you’re getting is because Katalon literally can’t start without that dropdown being set first. the execution profile workaround is the cleanest solution I’ve found

1 Like