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)Usage
Function Launch(
String ApplicationExecutableName,
String Arguments [Optional],
Boolean CloseAppBeforeOpening [Optional],
Boolean AlwaysSuccess [Optional]
)
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