Start Web Browser

A Start Web Browser building block is used to start a new web browser window when working with web automation. It supports different browser types and can open the browser window in normal, maximized and minimized mode.

Please note that next Web building block start executing on the new page only when client-side event ‘DOMReady’ is fired.

Fully expanded, the Start Web Browser block shows the following properties:

The Block Header (“Start Web Browser”)

The green input connector in the header is used to trigger the block to start executing.

The green output connector in the header triggers when the web browser has been opened and the web address (URL) loaded.

The title of the block (“Start Web Browser”) can be changed by double-clicking on it and typing in a new title.

Browser to start

Select which browser type to start.

Web address (URL)

The web address (URL) to navigate to using the browser. Can contain tokens for field values (added below).

Example of valid URL formats are : http://domain, https://domain, domain and IP address (xxx.xxx.xxx.xxx).

Text fields

Fields that enable the use of external values in the web address (URL).

To use the value of an added field, right-click the text field above where the web address (URL) can be entered and select “Insert token” and then insert this field’s name.

Fields can be renamed by double-clicking on them. The tokens will change their visual appearance accordingly.

Window mode

Select if the browser window should be displayed in normal, maximized or minimized mode when running the case.

  • Normal Mode: It will open browser in last known state of browser.
  • Maximized Mode: Browser will be opened and maximized to run the test.
  • Minimized Mode: Browser will be opened and minimized to run the test in minimized mode without disturbing user.

Window mode is not supported by Selenium Grid or external cloud providers such as Sauce Labs and Browserstack.

User profile

User profile is used, in case, certain plug-ins, extensions, bookmarks etc. are required while initializing test case. User can create custom profiles on Chrome and Firefox browsers which are saved on the local path of a machine. Refer here for detailed info on creation/usage of profiles.

Provide the path of the profile from the root directory.

e.g. C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>\

Device type

Using Chrome browser user can automate web applications on Desktop, Phone, Tablet and Laptop. Below are the options available under Device type section

  • ‘Desktop’: Use this option to automate web applications on desktop machines
  • ‘Phone, Tablet and Laptop’: Choose any desired option from dropdown
  • ‘Custom’: User can define custom devices by specifying Width, Height, Pixel rate and User agent.  Landscape/Portrait mode setting can be achieved by specifying Width, Height as per device.

Please note that device type section will be available only when ‘Browser to start’ is set to ‘Chrome’.

Binary location

Binary location text box is used to provide non-standard location for the chrome binary for example Chromium browser installed in non standard location or Chrome browser installed in non standard location at the time of installation.

Please note that this feature is only supported for Chrome browser.

Text fields

Fields that enable the use of external values in the Binary location.

To use the value of an added field, right-click the text field above where the Binary location can be entered and select “Insert token” and then insert this field’s name.

Fields can be renamed by double-clicking on them. The tokens will change their visual appearance accordingly.

Start Options

Start options are used, in case, user wants to open browser with some special options for example, '--start-maximized' option in start option is used to open browser in maximize mode, following are few more examples '--ignore-certificate-errors', '--disable-popup-blocking', '--incognito'

Please note that start option is available for Chrome and Firefox browsers only.

Text fields

Fields that enable the use of external values in the Start options.

To use the value of an added field, right-click the text field above where the  Start options can be entered and select “Insert token” and then insert this field’s name.

Fields can be renamed by double-clicking on them. The tokens will change their visual appearance accordingly.

Timeout occurred

This green output connector triggers if the browser was not started and the web address (URL) loaded within the timeout defined (see below).

Browser window

Once the browser window is opened and active, this property contains a handle to the window. This can be used in cases where multiple browser windows are opened during a case run, to direct other building blocks to use a specific window.

Multiple browser windows are not supported by Selenium Grid or external cloud providers such as Sauce Labs and Browserstack.

Timeout

The maximum time spent for opening the browser window and navigating to the web address (URL) before giving up and triggering “Timeout occurred” (see above).

The default value is 10 seconds.

Note: All cases have a “global timeout” that can be configured in the “Settings” panel. This is unrelated to the timeout of a single building block. However, a running case will automatically be cancelled if it runs for longer than the global timeout.

 

Updated April 20th, 2018.