application, launch, browser, execute, start, scriptless, script-less, scripted, step, view, stepview

Method Launch

Launches any AUT on PC or open a URL on a Mobile Device (to launch apps on mobile device other than a browser, use LaunchMobileApp method)

Launch method allows to execute applications locally or on connected devices. All you need is specify platform or device type and application name. Specifying device type ("iphone", "ipad"...) will launch the URL on the first connected device of that type

You can also specify the browser name when launching on mobile. The first word should be the platform or device type and the second is the browser name: "ios safari", "android firefox", "mobile chrome" (If browser name is not specified, default browser will be used)

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function Launch( 
    String ApplicationExecutableName,
    String Arguments [Optional],
    Boolean CloseAppBeforeOpening [Optional],
    Boolean AlwaysSuccess [Optional]
)

Application

Launch

chrome

zaptest.com

true

true

String ApplicationExecutableName

Arguments

Boolean CloseAppBeforeOpening [Optional]

Boolean AlwaysSuccess

Parameters

ApplicationExecutableName

Type: String

Path to the application or browser name (i.e. "chrome", "ios", "ios safari", "iphone", "android chrome")

To launch specific device by ID use: "id XXXXX [Optional AppID]". Default app ID is ZAP Browser ("zap"). Examples:

  • "id XXXXXX", "www.zaptest.com"
  • "id XXXXXX com.zaptest.demo"
  • "id XXXXXX chrome", "www.zaptest.com"
Arguments (optional)

Type: String

Default value: Empty String

Application arguments (i.e. "www.zaptest.com")

CloseAppBeforeOpening (optional)

Type: Boolean

Default value: False

Closes all opened application instances before running this step

AlwaysSuccess (optional)

Type: Boolean

Default value: False

Ignores failed execution status

Returns

No return value

Example

VBScript

'To launch browser on your computer just set browser name and start URL
Application("Demo").Launch "chrome", "www.zaptest.com"
'If script executes on different platforms you can set all platforms and browsers in Datatable and launch different applications on each iteration
Application("Demo").Launch Datatable.Value("Browser"), "www.zaptest.com"
'To close application instances before opening set CloseAppBeforeOpening optional parameter to true
Application("Demo").Launch Datatable.Value("Browser"), "www.zaptest.com", true
'Set AlwaysSuccess optional parameter to true if you need to ignore failed execution status
Application("Demo").Launch Datatable.Value("Browser"), "www.zaptest.com", true, true

JavaScript

// To launch browser on your computer just set browser name and start URL
Application("Demo").Launch("chrome", "www.zaptest.com");
// If script executes on different platforms you can set all platforms and browsers in Datatable and launch different applications on each iteration
Application("Demo").Launch(Datatable.Value("Browser"), "www.zaptest.com");
// To close application instances before opening set CloseAppBeforeOpening optional parameter to true
Application("Demo").Launch(Datatable.Value("Browser"), "www.zaptest.com", true);
// Set AlwaysSuccess optional parameter to true if you need to ignore failed execution status
Application("Demo").Launch(Datatable.Value("Browser"), "www.zaptest.com", true, true);

Comment

Launch Chrome browser and go to ZAPTEST website

Application

Launch

chrome

zaptest.com

Comment

Close all opened application instances and ignore fail execution status

Application

Launch

chrome

zaptest.com

true

true

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227