MobileApps Collection

MobileApps Collection

A collection of mobile apps used during a record or run session.

You must have the following Record and Run Settings defined before using this collection:

Object Model


Count Property

The number of mobile apps in the collection.

Item Property

Returns the specified MobileApp object. For details, see MobileApp Object.


Define the mobile app used in your test

'Create a QTP object

Set QTP = CreateObject("QuickTest.Application")


QTP.Visible = True


'Open a UFT Test

QTP.Open "C:\Users\Administrator\Desktop\scripts\Android\UFT_Replay_Android_Native_OOA_Script", TRUE

'Set the UFT test path

Set qtMobileLauncher = QTP.Test.Settings.Launchers("Mobile")

qtMobileLauncher.Lab = "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 UFT