MobileLauncher Object
Supported in versions 14.03 and later.
Represents the Mobile tab of the Record and Run Settings dialog box, which defines the devices and apps used for during a record or run session.
Before using this test object, you must have:
A connection set up to Mobile Center / UFT Mobile / Digital Lab / OpenText Functional Testing Lab.
The following Record and Run Settings defined:
On the Mobile tab, select Use Mobile Center, Use UFT Mobile, or Use mobile device depending on your product version.
On the Web tab, select Use settings on the Mobile tab.
Object Model
Methods
Defines the settings on the Web tab of the Record and Run Settings for mobile device testing. Required for running web tests on mobile devices. |
Properties
Device Property | Defines the device used during the test using the MobileDevice Object. |
ExtraApps Property | Defines a non-system mobile app to be used during the test using the MobileApps Collection. |
Defines whether the selected mobile apps are installed on the device at the start of the record or run session. | |
Defines the mobile device lab to use during a record or run session. | |
A MobileApp Object representing the app currently defined in the Record and Run Settings to launch at the start of your record or run session. | |
Defines whether the selected mobile apps are restarted on the device at the start of the record or run session. | |
Determines whether the device's CPU is tracked during your run session. | |
Determines whether the device's free memory is tracked during the run session. | |
Determines whether the device's logs are tracked during the run session. | |
Determines whether the device's memory is tracked during the run session. | |
Defines whether the selected mobile apps are uninstalled on the device at the end of the record or run session. |
Examples
The following script uses the EnableWebSettingForMobile method to define the settings on the Web tab of the Record and Run Settings dialog.
Dim QTP Set QTP = CreateObject("QuickTest.Application") QTP.Launch QTP.Visible = True QTP.Open "C:\Users\admin\Documents\UFT One\AOMMobileTest", TRUE 'Set the QTP test path Set qtMobileLauncher = QTP.Test.Settings.Launchers.Item("Mobile") qtMobileLauncher.Lab = "DigitalLab" 'UFT One 2023 or earlier: "MobileCenter" qtMobileLauncher.Device.ID = "bb0ce5eb_48da_44e7_bea9_84bad81abc71" qtMobileLauncher.Device.OS = "Android" qtMobileLauncher.EnableWebSettingForMobile Set qtMobileLauncher = Nothing Set QTP = Nothing
The following script starts the app with the counter of 1 at the start of the test.
Dim QTP Set QTP = CreateObject("QuickTest.Application") QTP.Launch QTP.Visible = True QTP.Open "C:\Users\admin\Documents\UFT One\AOMMobileTest", TRUE 'Set the QTP test path Set qtMobileLauncher = QTP.Test.Settings.Launchers.Item("Mobile") Set launchApp = qtMobileLauncher.LaunchOnStart launchApp.IsPackaged = True launchApp.Counter = 1 Set qtMobileLauncher = Nothing Set QTP = Nothing