Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
SEO Metadata
titleSeeTestAutomation - Launch

Launch activity (application) or navigate to given URL during runtime.

void Launch (activity, instrument, Stop if run)

Supported_os
SupportIOStrue
SupportAndroidtrue
SupportWPtrue

Description

Launch activity (application) or navigate to given URL during runtime.

Parameters

  • Activity: The application main activity (the application to be launched).
  • OR a URL page.
  • Instrument: Boolean
    • True: Will launch the app in instrumented mode.
    • FalseWill launch the app in non instrumented mode.
  • Stop if run - Boolean
    • TrueWill kill the application if it is on the background before reluanch  

Usage

In the following example we will launch the imdb application on the android device

Application is available on the application manager.

Device before:

Parameters:

Result:

Now you can click the object spy as the application is instrumented

 

Code Examples

Code Block
languagejava
titleJava Example
linenumberstrue
client.launch("com.imdb.mobile/.Home", true, true);
Code Block
languagec#
titleC# Example
linenumberstrue
collapsetrue
client.Launch("com.imdb.mobile/.Home", true, true);
Code Block
languagevb
titleVBScript Example
linenumberstrue
collapsetrue
client.Launch "com.imdb.mobile/.Home", true, true
Code Block
languagepy
titlePython Example
linenumberstrue
collapsetrue
self.client.launch("com.imdb.mobile/.Home", True, True)
Code Block
languageperl
titlePerl Example
linenumberstrue
collapsetrue
$client->launch("com.imdb.mobile/.Home", 1, 1);