Start Browser

Starts a web browser.

Command availability: IBM RPA SaaS and IBM RPA on premises

Script syntax

IBM RPA's proprietary scripting language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.

webStart --name(String) --type(BrowserTypes) [--loaduserprofile(Boolean)] [--enableextensions(Boolean)] [--extensionsFolder(String)] [--disablegpu(Boolean)] [--bypassExternalProtocols(String)] [--useproxy(Boolean)] [--isautodetect(Boolean)] [--username(String)] [--password(String)] --proxyaddress(String) --proxyport(Numeric) [--headless(Boolean)] [--commandexecutiontimeout(TimeSpan)] [--pageloadtimeout(TimeSpan)] [--implicitwaittimeout(TimeSpan)] [--asynchronousjavascripttimeout(TimeSpan)] [--incognito(Boolean)] (Browser)=value

Dependencies

Antivirus and ports can affect bots and block their operation. For antivirus, follow the instructions presented on the Antivirus section to add paths to the antivirus ignore list, and open the ports to trigger bots.

If you select Microsoft Edge as the browser that the Start browser command must open, you need to add commands to your script to handle pop-ups that appear if you enable the following input parameters:

  • Enable extensions (enableextensions)
  • Use proxy (useproxy)

See the Examples for workarounds to these issues.

Icon for remember notes Remember:

  • If you use IBM RPA on premises or IBM RPA on Red Hat® OpenShift® Container Platform, the IBM RPA server downloads web drivers from the internet. These downloads can take several minutes, or up to 1 hour for Microsoft Edge. An Internet connection is required.
    • ❕ Important: If you are in an air-gapped environment, you must download the web drivers manually.
  • When your bot runs the Start Browser command for the first time, the bot requests a web driver for download from the server. If the web driver is not available or can't be downloaded, the bot fails.

Input parameter

The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.

Designer mode label Script mode name Required Accepted variable types Description
Instance name name Required Text Name of the browser instance.
Browser type type Required BrowserTypes Type of browser to use.

See the type parameter options.
Load user profile loaduserprofile Optional Boolean Starts the session logged into the user's profile.

See limitations of this parameter in troubleshooting.
Enable extensions enableextensions Optional Boolean Allows installing extensions in the browser.
Extensions folder enxtensionsfolder Optional Text Folder path with the extensions to install.
Disable GPU disablegpu Optional Boolean Disables the graphics processing unit.
Bypass external protocols bypassexternalprotocols Optional Text A string defining which protocols to ignore.
Use proxy useproxy Optional Boolean Allows using a proxy-based connection.
Auto detect isautodetect Optional Boolean Detects the proxy automatically.
User name username Optional Text Proxy username.
Password password Optional Text Proxy user password.
Proxy address proxyaddress Only when Auto detect is False Text Address for the proxy connection.
Proxy port proxyport Only when Auto detect is False Number Port opened for the proxy connection.
Headless headless Optional Boolean Does not display the browser window.
Execution timeout commandexecutiontimeout Optional Time Span, Number, Text Timeout for starting the browser.
Page load timeout pageloadtimeout Optional Time Span, Number, Text Timeout for loading page components.
Implicit timeout implicitwaittimeout Optional Time Span, Number, Text Implicit timeout to run the command.
JavaScript timeout asynchronousjavascripttimeout Optional Time Span, Number, Text Timeout for running JavaScript callbacks.
Incognito incognito Optional Boolean Opens the browser window in incognito mode.
IE11 compatibility mode iecompatibility Only when Microsoft Edge is the Browser type Boolean Enable to open Microsoft Edge in Internet Explorer 11 compatibility mode.

type parameter options

The following table displays the options available for the type input parameter. The table shows the options available when working in Script mode and the equivalent label in the Designer mode.

Designer mode label Script mode name Description
Google Chrome Chrome Google Chrome browser.
Internet Explorer InternetExplorer Internet Explorer browser.
Microsoft Edge Edge Microsoft Edge (Chromium) browser.
Mozilla Firefox Firefox Mozilla Firefox browser.

Starting from version 21.0.3: IBM RPA supports Microsoft Edge (Chromium).

Output parameter

Designer mode label Script mode name Accepted variable types Description
Browser value Browser Returns the variable with the browser instance.

Examples

Example 1: Starts the Google Chrome browser:

webStart --name browser --type "Chrome"
// Navigate to the ibm web page.
webNavigate --url "ibm.com"
webClose --name browser --leavebrowseropen

Example 2: Starts the Microsoft Edge browser, closes the Turn off extensions in developer mode pop-up and navigates to the IBM page.

webStart --name browser --type "Edge"
// Close the pop-up
click --safesearch --selector "XPath" --controlsimilarity 100 --forcerefresh --xpath "//window[@name=\'Turn off extensions in developer mode\']//button[@name=\'Close\']" --timeout "00:00:20
// Navigate to the IBM web page.
webNavigate --url "ibm.com"
webClose --name browser --leavebrowseropen