Silk Mobile

Table of Contents (Homepage)

ApplicationClose

boolean ApplicationClose (package name)

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

Description

This command will close and kill the application on the foreground of the device during runtime.

Parameters

  • Package Name: The application package name

Usage

Scenario: On the following example we will use the EriBank Application to demonstrate the use of this command.

Parameter Can be set to application package name or as an empty string. Silk Mobile will identify the application on the foreground and will close it.

  1. Launch the application and enter Username and Password.

    images/download/attachments/3309665/11.jpg
  2. Execute the ApplicationClose command. Once command is completed we will get the HomeScreen of the device.
    images/download/attachments/3309665/12.jpg

Code Examples

Java Example
client.applicationClose("com.experitest.ExperiBank/.LoginActivity");
C# Example
client.ApplicationClose("com.experitest.ExperiBank/.LoginActivity");
VBScript Example
client.ApplicationClose "com.experitest.ExperiBank/.LoginActivity"
Python Example
self.client.applicationClose("com.experitest.ExperiBank")
Perl Example
$client->applicationClose("com.experitest.ExperiBank")