Blog
Read the latest blogs
Find tutorials, guides and use case examples in the
Learning center
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 the next web building block will start executing on the new page only when a client-side event ‘DOM Ready’ is fired.
Fully expanded, the Start Web Browser block shows the following properties:
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) has loaded.
The title of the block (“Start Web Browser”) can be changed by double-clicking on it and typing in a new title.
Select which browser type to start. The available options are:
The Web address (URL) is used to navigate using the browser; it can contain tokens for field values (added below).
Examples of valid URL formats are: http://domain, https://domain, domain and IP address (xxx.xxx.xxx.xxx).
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”, then insert this field’s name.
Fields can be renamed by double-clicking on them. The tokens will change their visual appearance accordingly.
Select if the browser window should be displayed in normal, maximized or minimized mode when running the case.
Window mode is not supported by the Selenium Grid or external cloud providers such as Sauce Labs and BrowserStack.
Using the Chrome browser, users can automate web applications on desktop, phone, tablet and laptop. Below are the options available under the Device Type section:
Please note that the Device Type section will be available only when ‘Browser to start’ is set to ‘Chrome’.
The Binary location text box is used to provide non-standard locations for the Chrome binary. For example, if the Chromium browser is installed in a non-standard location or the Chrome browser is installed in a non-standard location at the time of installation.
Please note that this feature is only supported for the Chrome browser.
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”, then insert this field’s name.
Fields can be renamed by double-clicking on them. The tokens will change their visual appearance accordingly.
The Start options are used in case a user wants to open the browser with some special options. For example, the '--start-maximized' option in the start option is used to open the browser in maximize mode. The following are a few more examples: '--ignore-certificate-errors', '--disable-popup-blocking', '--incognito'
Please note that the start option is available for Chrome, Edge and Firefox browsers only.
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.
The Selenium is an open-source, JavaScript-based testing tool that automates interactions with most modern web browsers.
When Selenium Check box is Checked:
In the Start Web Browser block, the Selenium checkbox is checked by default. With the box checked, your browser uses Selenium Framework elements to drive the automation of browser interactions actions such as Click, Find Element, and Inspect.
When Selenium Check box is Unchecked:
If you would like to switch over browser extension/web plugins for Chrome and Edge, you can uncheck the Selenium checkbox.
When Chrome/Edge loads, it will load with the Chromium Extension Framework elements, for the automation.
Since, Goggle Chrome & Edge are based on Chromium Framework, they support this testing framework as well & the performance of automation would be faster here as compared to Selenium. Chrome and Edge plugins remove the hassle of browser updates. It is primarily reducing the maintenance, speed up the testing process and boost web automation speed.
Note: To update the test cases, you can use the bulk update option or update the test cases one-by-one. This option is effective for above specified 2 browsers (Chrome and Edge) only as of now.
Select the profile from the drop-drop.
Temporary: This option refers to the user profile that is temporary created by any browser with a clear history. This can be used to start the browser in a clean session imitating users visiting web pages for the first time. And this profile is deleted immediately after the flow completion.
Existing: This option refers to the user profile that is already exist in any browser with predefined data. This also means that all cookies, cached documents, and logged-in user session data will be available in the automation.
Last Used: This option is only available when your Selenium is unchecked. It will load the last used user profile for the selected browser.
The User profile is used when certain plug-ins, extensions, bookmarks etc. are required while initializing a test case. Users can create custom profiles on Chrome, Edge and Firefox browsers which are saved on the local path of a machine. Refer the links here for Chrome, Edge, and Firefox for detailed info on the creation/usage of profiles.
Remember to provide the path of the profile from the root directory, e.g., C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>\
Note: (C:\Users\(User Name)\AppData\Local\Google\Chrome\User Data\Default) likewise for Chrome.
(C:\Users\AnupamaSharma\AppData\Local\Microsoft\Edge\User Data\Default) likewise for Edge
Fields that enable the use of external values in the User profile.
To use the value of an added field, right-click the text field above where the User profile 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.
This green output connector triggers if the browser was not started or the web address (URL) was not loaded within the timeout defined.
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.
If the 'Default Timeout' property checkbox is not selected, then the timeout value is 10 seconds. If the 'Default Timeout' property checkbox is selected, then the 'Default timeout' value selected in the flow settings will be applicable.
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).
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.
©2024, Leapwork. All rights reserved.