Object Model Reference for GUI Testing > Mobile > Kill Method

App Object

Description

A mobile app.

Operations

The sections below list the built-in methods and properties that you can use as operations for the App object.

Note: You can also view a list and descriptions of the App description properties, for use in object repository descriptions, programmatic descriptions, checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.

Methods

Common Method Check Checks whether the actual value of an item matches the expected value.
Common Method CheckProperty Checks whether the specified object property achieves the specified value within the specified timeout.
Common Method ChildObjects Returns the collection of child objects contained within the object.
Common Method GetROProperty Returns the current value of the specified description properties from the object in the app.
Common Method GetTOProperties Returns the collection of properties and values used to identify the object.
Common Method GetTOProperty Returns the value of the specified description properties from the test object description.
Kill Closes the app.
Method Launch Launches the app.
Common Method Output Retrieves the current value of an item and stores it in a specified location.
Common Method RefreshObject Instructs UFT to re-identify the object in the app the next time a step refers to this object.
SetFingerprintSimulationMode

Defines whether the fingerprint authentication simulation is enabled.

Common Method SetTOProperty Sets the value of the specified description properties in the test object description.
SimulateCamera Starts camera simulation.

SimulateFingerprint

Simulates a fingerprint authentication simulation.
SimulateVideo Starts video camera simulation.
StopSimulateVideo Stops camera simulation.
StopSimulateCamera Stops video camera simulation.
Common Method ToString Returns a string that represents the current test object.
Uninstall

Uninstalls the app from the device.

Common Method WaitProperty Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Back to top

Kill Method

Description

Stops the app and all its processes.

Syntax

object.Kill

Return Type

None

Example

Back to top

Launch Method

Description

Launches the app.

Syntax

object.Launch [InstallApp], [RestartApp]

Arguments

Parameter Description
InstallApp Optional. A InstallAppBehavior Value.

The installation behavior for the selected mobile app.

Possible values:

  • DefaultInstallBehavior: Installs the app according to the settings in the Record and Run Settings dialog box.
  • DoNotInstall: Ignores the Record and Run Settings and does not install the app on the mobile device.
  • Install: Ignores the Record and Run Settings and installs (or reinstalls) the app on the mobile device.

Default value = 0
RestartApp Optional. A RestartAppBehavior Value.

The restart behavior for the selected mobile app.

Possible values:

  • DefaultRestartBehavior: Restarts the app according to the settings in the Record and Run Settings dialog box.
  • DoNotRestart: Ignores the Record and Run Settings and does not restart the app on the mobile device.
  • Restart: Ignores the Record and Run Settings and restarts the app on the mobile device.

Default value = 0

Return Type

None

Back to top

SetFingerprintSimulationMode Method

Description

Determines whether fingerprint authentication simulation is enabled.

Syntax

object.SetFingerprintSimulationMode([enableSimulation])

Arguments

Parameter Description
enableSimulation

A boolean value:

  • True. Fingerprint simulation is enabled.
  • False. Fingerprint simulation is disabled.

Return Type

None

Example

Back to top

SimulateCamera Method

Description

Starts camera simulation.

Syntax

object.SimulateCamera ReferenceName, [SimulateCount]

Arguments

Parameter Description
ReferenceName Required. A string value.

The reference name for the files to replace the camera output. These files must be uploaded before the test run with the same name.

SimulateCount Optional. An integer value.

The number of times for the simulation.

Return Type

A boolean value indicating success of the simulation.

Back to top

SimulateFingerprint Method

Description

Simulates a fingerprint authentication simulation action. This method is not supported for recording.

Syntax

object.SimulateFingerprint ([Result], [ResultInfo])

Arguments

Parameter Description
Result

Required. A string value giving the result of the authentication.

One of the following:

  • Success
  • Failure
  • Cancel
ResultInfo

Optional. A string value giving more details about the result.

Not relevant for Success results.

One of the following:

Failure:

  • FingerIncomplete (Android only)
  • Lockout
  • NoFingerprintRegistered (iOS only)
  • NotRecognized
  • SensorDirty (Android only)

Cancel

  • System
  • User (iOS and Android 8.1 or higher)

Return Type

A string indicating the success of the simulation, and any failure reasons if relevant.

Example

Back to top

SimulateVideo Method

Description

Starts video simulation.

Syntax

object.SimulateVideo ReferenceName, [SimulateCount]

Arguments

Parameter Description
ReferenceName Required. A string value.

The reference name for the files to replace the camera output. These files must be uploaded before the test run with the same name.

SimulateCount Optional. An integer value.

The number of times for the simulation.

Return Type

A boolean value indicating success of the simulation.

Back to top

StopSimulateCamera Method

Description

Stops camera simulation.

Syntax

object.SimulateCamera

Return Type

None

Back to top

StopSimulateVideo Method

Description

Starts camera simulation.

Syntax

object.StopSimulateVideo

Return Type

None

Back to top

Uninstall Method

Description

Uninstalls the app from the device.

Syntax

object.Uninstall

Return Type

None

Example

Back to top

See also: