FileSystemManager Property

Applies to TestComplete 14.91, last modified on July 20, 2021
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

Returns the FileSystemManager object that provides access to the Android device’s file system.

Declaration

AndroidDeviceObjObj.FileSystemManager

Read-Only Property A FileSystemManager object
AndroidDeviceObjObj An expression, variable or parameter that specifies a reference to an AndroidDeviceObj object

Applies To

The property is applied to the following object:

Property Value

The FileSystemManager object that provides access to the device’s file system and allows working with the files and folders stored on the device.

Example

The sample code below demonstrates how to access the connected Android device’s file system and copy a file from the local computer to the device:

JavaScript, JScript

function Test()
{

  var fileSystemManager = Mobile.Device("MyDevice").FileSystemManager;

  var pathOnDevice = "data/data";
  var pathOnHost = "C:\\TestComplete Work Folder\\Orders.apk";

  fileSystemManager.CopyToDevice(pathOnHost, pathOnDevice);

}

Python

def Test():

  fileSystemManager = Mobile.Device("MyDevice").FileSystemManager

  pathOnDevice = "data/data"
  pathOnHost = "C:\\TestComplete Work Folder\\Orders.apk"

  fileSystemManager.CopyToDevice(pathOnHost, pathOnDevice)

VBScript

Sub Test

  Set fileSystemManager = Mobile.Device("MyDevice").FileSystemManager

  pathOnDevice = "data/data"
  pathOnHost = "C:\TestComplete Work Folder\Orders.apk"

  Call fileSystemManager.CopyToDevice(pathOnHost, pathOnDevice)

End Sub

DelphiScript

procedure Test();
var fileSystemManager, pathOnDevice, pathOnHost;
begin

  fileSystemManager := Mobile.Device('MyDevice').FileSystemManager;

  pathOnDevice := 'data/data';
  pathOnHost := 'C:\TestComplete Work Folder\Orders.apk';

  fileSystemManager.CopyToDevice(pathOnHost, pathOnDevice);

end;

C++Script, C#Script

function Test()
{

  var fileSystemManager = Mobile["Device"]("MyDevice")["FileSystemManager"];

  var pathOnDevice = "data/data";
  var pathOnHost = "C:\\TestComplete Work Folder\\Orders.apk";

  fileSystemManager["CopyToDevice"](pathOnHost, pathOnDevice);

}

See Also

AndroidDevice Object
Testing Android Applications (Legacy)

Highlight search results