RefreshPackagesInfo Method

Applies to TestComplete 15.45, last modified on December 01, 2022
The information below concerns legacy mobile tests that work with mobile devices connected to the local computer. For new mobile tests, we recommend using the newer cloud-compatible approach.

Description

Refreshes information about the packages installed on the device.

Declaration

PackageManagerObj.RefreshPackagesInfo()

PackageManagerObj An expression, variable or parameter that specifies a reference to a PackageManager object
Result None

Applies To

The method is applied to the following object:

Result Value

None.

Example

The following code demonstrates the usage of the RefreshPackagesInfo method:

JavaScript, JScript

function Test()
{
  var DeviceObj = Mobile.Device("VirtualBox");
  var PackManagerObj = DeviceObj.PackageManager;
  // Perform some actions with the device
  // For instance, install packages or remove them
  PackManagerObj.RefreshPackagesInfo;
  // Now, the PackManagerObj contains correct information
}

Python

def Test():
  DeviceObj = Mobile.Device("VirtualBox")
  PackManagerObj = DeviceObj.PackageManager
  # Perform some actions with the device
  # For instance, install packages or remove them
  PackManagerObj.RefreshPackagesInfo
  # Now, the PackManagerObj contains correct information

VBScript

Sub Test
  Set DeviceObj = Mobile.Device("VirtualBox")
  Set PackManagerObj = DeviceObj.PackageManager
  ' Perform some actions with the device
  ' For instance, install packages or remove them
  PackManagerObj.RefreshPackagesInfo
  ' Now, the PackManagerObj contains correct information
End Sub

DelphiScript

function Test;
var DeviceObj, PackManagerObj: OleVariant;
begin
  DeviceObj := Mobile.Device('VirtualBox');
  PackManagerObj := DeviceObj.PackageManager;
  // Perform some actions with the device
  // For instance, install packages or remove them
  PackManagerObj.RefreshPackagesInfo;
  // Now, the PackManagerObj contains correct information
end;

C++Script, C#Script

function Test()
{
  var DeviceObj = Mobile["Device"]("VirtualBox");
  var PackManagerObj = DeviceObj["PackageManager"];
  // Perform some actions with the device
  // For instance, install packages or remove them
  PackManagerObj["RefreshPackagesInfo"];
  // Now, the PackManagerObj contains correct information
}

See Also

PackageManager Object

Highlight search results