Open URL
Verb: openUrl
Opens a specified URL using the system default web browser or a specified one, then returns process id of the browser that opened the URL.
Syntax
openUrl --url(String) [--useCustomBrowser(Boolean)] --customBrowser(String) (Numeric)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--url | URL | Required | Text | URL (website address) that is opened by the command.
Any URL opened by a web browser can be used: Internet URLs, Intranet etc. |
--useCustomBrowser | Use Custom Browser | Optional | Boolean | When enabled, allows the use of a custom web browser. |
--customBrowser | Custom Browser | Only whenUse Custom Browser is True | Text | Path to the custom web browser executable file. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Process ID | Number | Browser startup process id with the given URL.
This is the number that identifies the process executed (browser opened with the URL) on your operating system. |
Example
Example 1: The command opens with the default browser the URL entered in the parameter URL.
defVar --name processID --type Numeric
openUrl --url "https://www.ibm.com" processID=value
logMessage --message "${processID}" --type "Info"
// The above example displays the page entered in the browser and displays the process ID number for that browser:
// [Example]: 83384.
Example 2: The command opens a site by specifying its URL from a custom browser.
defVar --name processID --type Numeric
defVar --name browserPath --type String
selectFile --title "Select the path to the desired custom browser's executable" --filter "*exe" browserPath=value
// Opening URL, selecting a custom browser, accessing the folder and file where it is installed.
openUrl --url "https://www.ibm.com" --useCustomBrowser --customBrowser "${browserPath}" processID=value
logMessage --message "${processID}" --type "Info"
// The above example displays the page entered in the specified browser and displays the process ID number of that browser:
// [Example]: 61672.