Silk Mobile

Table of Contents (Homepage)

Install

Install(app, Instrumented, KeepData )

Description

Install the application on the tested device during runtime.

Note: Throws an exception if installation is not successful.

Parameters

  • Application: Application name.

    • Application identifier which is available on the application manager

    • Path to the application on local disk

    • Install from URL (supported protocols HTTP/HTTPS (Default Ports: 80/443))

      HTTPS

      To install application from HTTPS: add the line "trust.ignore=true" to the app.properties file located in the %appdata% folder.

  • Instrument: Boolean (relevant only for installation not by the Application identifier).

    • true: will be installed instrumented

    • false: will be installed regularly without instrumentation

  • KeepData - (Only for android)

    • true: will upgrade the existing application installed without losing its data.

    • false: will run over the application

Installation Options

Install from application manager

Scenario: In the following example we will use the application identifier as available on the application manager (No need to specify a version number)

images/download/attachments/2689493/1.jpg

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

images/images/os-icons/os_blackberry_150x150.png

Parameters:

  • Path: Application path – set to com.imdb.mobile/.Home

  • instrument: Not relevant - Will always be installed instrumented

  • KeepData: Will be set to True

Code Examples

Java Example
client.install("com.imdb.mobile/.Home", true, true);
C# Example
client.Install("com.imdb.mobile/.Home", true, true);
VBScript Example
client.Install("com.imdb.mobile/.Home", true, true);
Python Example
self.client.install2("com.imdb.mobile/.Home", True, True);
Perl Example
$client->install2("com.imdb.mobile/.Home", 1, 1);
RFT Example
client.install("com.imdb.mobile/.Home", true, true);
VUGen Example
ic_install(&c, "com.imdb.mobile/.Home", IC_TRUE, IC_TRUE);

Install from local disk

Scenario: In the following example we will use the 'Install' command with a path to IMDb apk available on the local disk. We will set the instrument parameter to true in order to instrument the app during installation.

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

images/images/os-icons/os_blackberry_150x150.png

Parameters:

  • Path: Application path – set to C:\applications\com.imdb.mobile.apk

  • Instrument: Will be set to True

  • Keep Data: Will be set to True

    images/download/attachments/2689493/2.jpg

Code Examples

Java Example
client.Install("c:\\applications\\com.imdb.mobile.apk", true, true);
C# Example
client.Install("c:\\applications\\com.imdb.mobile.apk", true, true);
VBScript Example
client.Install("c:\\applications\\com.imdb.mobile.apk", true, true);
Python Example
self.client.install2("c:\\applications\\com.imdb.mobile.apk", True, True);
Perl Example
$client->install2("c:\\applications\\com.imdb.mobile.apk", 1, 1);
RFT Example
client.install("c:\\applications\\com.imdb.mobile.apk", true, true);
VUGen Example
ic_install(&c, "c:\\applications\\com.imdb.mobile.apk", IC_TRUE, IC_TRUE);

Install from URL

Scenario: In the following example we will use the 'Install' command with a path to IMDb apk available at a specific url. We will set the instrument parameter to true to instrument the app during installation.

images/download/attachments/2689493/image2015-8-9%2016_40_5.png

Note: Supported only for .ipa, .apk and .xap files.

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

Parameters:

Notes:
  1. If authentication is needed, user can set the username and password in the URL like: http://username:password@www.buildserver.com/application.apk

  2. Whenever the appPath supplied by the USER doesn’t contain a supported URL prefix the command will look for an app package on the local machine.

Code Examples

Java Example
client.install("http://192.168.1.234/Application%20Collection/com.imdb.mobile-1.apk", true, true);
C# Example
client.Install("http://192.168.1.234/Application%20Collection/com.imdb.mobile-1.apk", true, true);
VBScript Example
client.Install("http://192.168.1.234/Application%20Collection/com.imdb.mobile-1.apk", true, true );
Python Example
self.client.install2("http://192.168.1.234/Application%20Collection/com.imdb.mobile-1.apk", True, True);
Perl Example
$client->install2("http://192.168.1.234/Application%20Collection/com.imdb.mobile-1.apk", 1, 1);
RFT Example
client.install("http://192.168.1.234/Application%20Collection/com.imdb.mobile-1.apk", true, true);
VUGen Example
ic_install(&c, "http://192.168.1.234/Application%20Collection/com.imdb.mobile-1.apk", IC_TRUE, IC_TRUE);

Possible Issues

Download Issues

  • Download stops in the middle: Command failure .
    Response: Download failure error message.

  • Download process takes a long time.
    Response: Message indicating long timeout: Command failure .

  • URL is not valid: Command failure .
    Response: URL related error message.

  • Authentication failure: Command failure.
    Response: Message indicating unauthorized download due to wrong credentials.

Instrumentation & Import Issues

  • Instrumentation failure.

  • Downloaded app is not compatible to the device’s OS.
    Response: Instrument and import the downloaded app anyway (command will fail on installation).

Install Issues

  • Downloaded app is not compatible to the device’s OS: Command failure .
    Response: OS related error message.

  • SDK is not compatible with the downloaded app: Command failure .
    Response: SDK related error message.

  • iOS device is not included in the provision: Command failure .
    Response: Provision related error message.