Skip to main content

getDeviceOS returns null

When users run Mobile.getDeviceOS() function to get the device OS / platform name in TestCloud mobile environment, the function returns null.

Users can use the code below to achieve the platform name and platform version when running tests with TestCloud devices.
import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory

import io.appium.java_client.AppiumDriver

AppiumDriver<?> driver = MobileDriverFactory.getDriver()
println driver.getCapabilities().getCapability("platformName")
println driver.getCapabilities().getCapability("platformVersion")

On Android:

On iOS:

Was this page helpful?