Transfer files to Android

With the Mobile Engine 3.0, you can transfer files between your computer and an Android device with the Modules Upload File to Mobile Device and Download File from Mobile Device.

You can find the Modules in the Standard subset under Standard modules->TBox XEngines->Mobile.

The file upload limit is 2 GB.

If the file already exists on the Android device or your computer, the Mobile Engine 3.0 overwrites it.

On Samsung devices, replace Internal Storage with sdcard in the file path. For example, replace /Internal storage/Download/abc.txt with /sdcard/Download/abc.txt.

Follow the instructions in this chapter to perform the following actions:

Upload files to a mobile device

The Module Upload File to Mobile Device allows you to upload a file from a computer to an Android device.

To upload files to a mobile device, follow the steps below:

  1. Specify the test configuration parameters to establish a connection with the device.

  2. Add either the Open Mobile App TestStep or the OpenUrl TestStep as a first TestStep in the execution.

  3. Drag and drop the Upload File to Mobile Device Module onto your TestCase.

  4. Specify the XTestStepValues for ModuleAttributes Desktop Path and Mobile Device Path.

  5. Set the ActionMode to Input.

In this example, you transfer the file example.png from your computer to your Android device.

Upload File to Mobile Device Module in a TestCase

Download files from a mobile device

The Module Download File from Mobile Device allows you to download a file from an Android device to a computer.

To download files from a mobile device, follow the steps below:

  1. Specify the test configuration parameters to establish a connection with the device.

  2. Add either the Open Mobile App TestStep or the OpenUrl TestStep as a first TestStep in the execution.

  3. Drag and drop the Download File from Mobile Device Module onto your TestCase.

  4. Specify the XTestStepValues for ModuleAttributes Desktop Path and Mobile Device Path.

  5. Set the ActionMode to Input.

In this example, you download the file example.png from your Android device to your computer.

Download File from Mobile Device Module in a TestCase