Sometimes you might want your mobile test to run differently depending on the device or build. To assist with this effort, we've added new mobile variables that indicate the device and mobile build file details.
With the new variables, you can conveniently add conditional steps to alter the behavior within the test depending on which build or device the test is running on. The new variables are as follows:
-
app.build_name
: the name of the mobile build file -
app.build_version
: the version of the mobile build file - only present if a version was set for the mobile build file uploaded to the workspace -
device.model
: the model of the device -
device.height
: the height of the device -
device.width
: the width of the device -
os.api_level
: the API level of the OS on the device - only applicable for Android devices -
os.version
: the OS version on the device
Check it out
In the mabl Trainer, you can review mobile variables for your test in the variables modal:
- Click on the {x} variable button at the bottom of the Trainer window
- Select "Manage variables" to open the variables modal.