MobileApps Collection
Supported in versions 14.03 and later.
A collection of mobile apps used during a record or run session.
Before using this collection, 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 OpenText Functional Testing version.
On the Web tab, select Use settings on the Mobile tab.
Object Model
Properties
The number of mobile apps in the collection. | |
Returns the specified MobileApp object. For details, see MobileApp Object. |
Example
Define the mobile app used in your test
'Create a QTP object Set QTP = CreateObject("QuickTest.Application") QTP.Launch QTP.Visible = True 'Open a Test QTP.Open "C:\Users\Administrator\Desktop\scripts\Android\UFT_Replay_Android_Native_OOA_Script", TRUE 'Set the test path Set qtMobileLauncher = QTP.Test.Settings.Launchers("Mobile") qtMobileLauncher.Lab = "DigitalLab" 'UFT One 2023 or earlier: "MobileCenter" qtMobileLauncher.Device.OS = "Android" qtMobileLauncher.Device.OSVersionCriteria = ">=6.0" set MyExtraApps = qtMobileLauncher.ExtraApps MyExtraApps.Item(1).Counter = 1 MyExtraApps.Item(1).IsPackaged = "false" msgbox "App 1 identifier: " & MyExtraApps.Item(1).Identifier msgbox "App 1 name: " & MyExtraApps.Item(1).Name msgbox "Before change counter App 3 counter: " & MyExtraApps.Item(1).Counter 'Set the result location Set qtpResultsOpt = CreateObject("QuickTest.RunResultsOptions") qtpResultsOpt.ResultsLocation = "C:\Users\Administrator\Desktop\scripts\Android\UFT_Replay_Android_Native_OOA_Script" + "\Results" 'Set the results location 'Run the test QTP.Test.Run qtpResultsOpt 'Close the testing application QTP.Test.Close QTP.Quit