RefreshPackagesInfo Method

Applies to TestComplete 14.72, last modified on January 20, 2021

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