How is Mobile center invoked by using descriptive programming
I don't want to open my MC from record and run settings, instead I want to open the MC and install the apps then execute the script. I have given below script where my MC gets opened, but instead it is showing a blank page.
Is there any workaround to open MC and install apps from descriptive programming?
'Assigning to variables
DeviceType = Environment.Value("DeviceType")
DeviceOS = Environment.Value("DeviceOS")
DeviceID = Environment.Value("DeviceID")
'Create an instance of the QTP
Set App = CreateObject("QuickTest.Application")
App.Options.MCConnection.Server = "/ServerName"
App.Options.MCConnection.Port = "Port"
App.Options.MCConnection.Username = "Username"
App.Options.MCConnection.Password = Pwd
App.Options.MCConnection.UseSSL = False
App.Options.MCConnection.ShowRemoteWndOnRun = False
'App.Options.MCConnection.SharedSpace = "123"
App.Options.MCConnection.WorkSpace = "Default Workspace"
'Create object for MobileLauncher
'Defining device to use in Test script
qtMobileLauncher.Lab = "mc"
When you run a Mobile test and it gets to a line where it interacts with a mobile test object, UFT will first determine the device and app that it will be used for the run session based on the Device and App test objects' description (no matter if it is given using Object Repository or Descriptive Programming). If these details are not provided in the test objects’ descriptions, then UFT uses the device and application that were defined in UFT’s Record and Run Settings.
For example, using Descriptive Programming, in the below line I am specifying the device and app that will be used, so the settings under UFT’s Record and Run Settings will be skipped:
For more info, check “UFT Mobile test run flow” topic through the below link: