Web Browser - Open

Declaration

<AMWEBBROWSER URL="text" BROWSER="text (options)" IEMODE="YES/NO" SESSION="text" EXTENSIONS="text" BROWSERCLOSE="YES/NO" WINDOWCLASSVARIABLE="text" WINDOWTITLEVARIABLE="text" WINDOWHANDLEVARIABLE="text" RESULTDATASET="text" USERPROFILE="text" />

Related Topics   

Description

Opens a web browser at the specified URL and establishes a session where to correlate subsequent browser-related steps. This activity can detect when a web page is finished loading before moving onto the next step. To end a session, use the Web Browser - Close activity.

NOTE:
  • The Web Browser action is not backwards compatible with the Web Browser (Legacy) action.
  • Automation with the Web Browser action is only compatible with Internet Explorer, Chrome, Edge, and Firefox browsers.
  • You must update the specified browser to the latest version and install it on the target system to ensure the Web Browser action functions correctly.
  • Unlike other session-based actions where sessions are optional, the Web Browser action requires the use of a session as each created session explicitly links to a specific web browser instance (you can create a session using the Web Browser - Create session or Web Browser - Open activity). A single task can support numerous sessions; however, since Web Browser activities are performed interactively (and not in the background), each session must run concurrently to avoid sending interactions to the wrong browser window.
  • For Chrome and Edge browsers, you must set the RemoteDebuggingAllowed policy to true to allow automation with this activity. For more information, see Known policy issue.

Practical usage

Used to open a web browser in order to start an automated task to interact with it.

Parameters

Browser

Property Type Required Default Markup Description
Browser Text (options) Yes Chrome
  • BROWSER="default"
  • BROWSER="chrome"
  • BROWSER="edge"
  • BROWSER="firefox"
  • BROWSER="safari"
Specifies the browser to open. The following options are available:
  • Default Browser - The default browser specified by your system.
    NOTE: Selecting this option disables automation, even if the default browser is Internet Explorer, Chrome, Edge, or Firefox. To enable automation, you must select Internet Explorer, Chrome, Edge, or Firefox explicitly from the Browser box.
  • Internet Explorer
  • Chrome (default)
  • Edge
  • Firefox
  • Safari - Automation is not supported with this browser.
NOTE: Firefox does not require a separate extension to be installed with this version of the Web Browser action.
Page URL Text Yes (Empty) URL="www.google.com" The URL to use with this activity (for example, www.fortra.com or https://www.fortra.com).
Enable IE mode Yes/No No No IEMODE="YES" If selected, enables Internet Explorer (IE) mode which provides legacy support for Internet Explorer-based websites and applications in the Edge browser. This parameter becomes available when the Browser parameter is set to Edge and disabled by default.
Close after completion Yes/No No No BROWSERCLOSE="NO" If selected, the web browser window automatically closes after task execution. If disabled, the window remains open after task execution to allow manual work to be performed in the window, if desired. This parameter is disabled by default.
Create a new session (automation-supporting browsers only) Text Yes BrowserSession1 SESSION="mySession" The name of the session to create. A session explicitly links to a specific web browser instance. In order to automate a series of web browser steps, subsequent activities must be linked to this session. The default session name is BrowserSession1.
NOTE: Sessions are only supported in Internet Explorer, Chrome, Edge, and Firefox browsers only. Firefox does not require a separate extension to be installed with this version of the Web Browser action.

Advanced

Property Type Required Default Markup Description
Wait until the page is completely loaded Yes/No No Yes FINISHLOADING="NO" If selected, this activity waits for the web page specified in the Page URL parameter to be completely loaded before continuing to the next step. If disabled, this activity continues to the next step without waiting. Set this parameter to YES if the following step requires interaction with the web page.
NOTE: This parameter is only supported in Internet Explorer, Chrome, Edge, and Firefox browsers.
Populate variable with window class Text No Disabled WINDOWCLASSVARIABLE="theClass" If enabled, specifies the name of an existing variable to populate with the window class of the browser window to open. This parameter is disabled by default.
NOTE: This parameter is only supported in Internet Explorer, Chrome, Edge, and Firefox browsers.
Populate variable with window handle Text No Disabled WINDOWHANDLEVARIABLE="theHandle" If enabled, specifies the name of an existing variable to populate with the window handle of the browser window to open. This parameter is disabled by default.
NOTE: This parameter is only supported in Internet Explorer, Chrome, Edge, and Firefox browsers.
Create and populate dataset Text No Disabled RESULTDATASET="theDataset" The dataset to create and populate with information about the browser window that was opened. For information regarding the individual dataset fields this activity creates, see Datasets.
NOTE: This parameter is only supported in Chrome, Edge, and Firefox browsers.
Populate variable with window title Text No Disabled  WINDOWTITLEVARIABLE="theTitle"  If enabled, specifies the name of an existing variable to populate with the window title of the browser window to open. This parameter is disabled by default.
NOTE: This parameter is only supported in Internet Explorer, Chrome, Edge, and Firefox browsers.
Load user profile Text No Disabled USERPROFILE="Person 1" If enabled, specifies the existing user profile to load for Chrome and Firefox browsers. This parameter is disabled by default.
NOTE: This parameter is only supported in Chrome, Edge, and Firefox browsers.
Load extension(s) Text No (Empty) EXTENSIONS="C:\Users\User\Documents\AutoMate 2024 Tasks\settings.crx" Specifies the path and file name of the Chromium-based browser extension file(s) (.crx) to load. This can be a fully qualified path and file name, or a single file. Multiple files are specified by clicking the folder icon , and then selecting each desired file, or by manually entering and separating each path and file name with a pipe character (|) (for example, c:\temp\*.crx|c:\backup\*.crx). This parameter becomes available when the Browser parameter is set to Chrome or Edge.
NOTE:
  • Loading an extension file uninstalls and replaces any existing extension file currently in use by the user's profile.
  • Creating a browser session with a user's profile and then loading an extension file into that session will cause additional browser instances (launched manually or in Automate Desktop) to also load the same extension file.

Description

Error Causes

On Error

Additional notes

Known policy issue

If you experience automation issues with your web browser and this activity, see the following:

IMPORTANT: Consult your system administrator before making changes to any policy.
Policy name Browser Required setting Description
RemoteDebuggingAllowed
  • Chrome

  • Edge

true Issue:

If this policy is set to false, Automate Desktop will display the error message "Unable to determine browser version" while attempting to open or create a session with Chrome or Edge.

Resolution:

Set this policy to true to allow this activity to perform automation with Chrome or Edge. For more information on this policy, see:

Using the Edge Browser with IE Mode enabled (Enable IE mode) in Automate Desktop: Known limitations and required updates and configurations

ClosedKnown limitations

The following are known limitations that can occur while using IE mode with the Edge browser in Automate Desktop:

  • IE mode can cause Edge to perform slower and behave differently than other available browsers. Some examples are slower execution times for tasks, or slower response times while using Automate Desktop's Window Dissection Technology () to select HTML elements.

  • Do not manually interact with Edge browser tabs outside of the task. Doing so can cause the task to fail.

  • When the Web Browser - Open activity runs in a task, or if a browser window is opened by another Web Browser activity (for example, using the Web Browser - Click activity to click an Open button), the web browser will first navigate to http://localhost:<random port number>/, and then navigate to the provided URL.

  • Configurable sites have limitations, based on the version of Windows currently running. See the Microsoft doc Learn about Configurable sites in IE mode for more information.

  • Microsoft Edge (with IE mode disabled), Chrome, and Firefox browsers load in Automate Desktop without predefined settings and a profile. However, if IE mode is enabled in the Edge browser, it will load the predefined settings of the default profile currently in use with the browser instead.

ClosedRequired updates and configurations

The following Microsoft Edge, Internet Explorer, and Windows updates and configurations are required to use IE mode in Automate Desktop:

  • Install the latest Windows updates (all supported versions of Windows):

    To ensure the Internet Explorer mode API version in the Edge browser has the latest updates, install the latest Windows updates available to you. After updating Windows, enter edge://compat/iediagnostic in the Edge browser's address bar and confirm the Attempt to launch Internet Explorer mode setting displays Success on the Internet Explorer mode diagnostic information page.

  • Prevent Internet Explorer from opening sites in Microsoft Edge (all supported versions of Windows):

    To ensure IE mode opens web pages in Edge correctly, do the following:

    1. Open Microsoft Edge.

    2. In the upper-right corner of the browser window, select the Settings and more icon , and then select Settings.

    3. From the navigation pane on the left, select Default browser.

    4. For the Let Internet Explorer open sites in Microsoft Edge, select the drop-down arrow, and then select Never.

  • Disable Protected Mode in Internet Explorer 7 (Windows Vista, Windows 7, and Windows 10):

    Disable the Enable Protected Mode setting for each security zone in Internet Explorer 7. To view and configure this setting for each security zone, do the following:

    1. Open Internet Explorer 7.

    2. Select Tools > Internet Options.

    3. Select the Security tab.

    4. Select the Internet zone.

    5. Clear the Enable Protected Mode (requires restarting Internet Explorer) checkbox if it is selected.

    6. Select the Local intranet zone.

    7. Clear the Enable Protected Mode (requires restarting Internet Explorer) checkbox if it is selected.

    8. Select the Trusted sites zone.

    9. Clear the Enable Protected Mode (requires restarting Internet Explorer) checkbox if it is selected.

    10. Select the Restricted sites zone.

    11. Clear the Enable Protected Mode (requires restarting Internet Explorer) checkbox if it is selected.

    12. When finished, select OK.

    13. Close and then restart Internet Explorer 7.

  • Disable Enhanced Protected Mode in Internet Explorer 10/Internet Explorer 11 (Windows Vista, Windows 7, and Windows 10):

    Disable the Enable Enhanced Protected Mode setting in Internet Explorer 10/Internet Explorer 11. To view and configure this setting, do the following:

    1. Open Internet Explorer 10/Internet Explorer 11.

    2. Select Tools > Internet Options.

    3. Select the Advanced tab.

    4. Scroll down to the Security section.

    5. Clear the Enable Enhanced Protected Mode checkbox if it is selected.

    6. Select OK.

    7. Close and then restart Internet Explorer 10/Internet Explorer 11.

  • Adjust display settings (Windows 10):

    Set the Change the size of text, apps, and other items to 100% in Windows 10. To view and configure this setting, do the following:

    1. In Windows 10, select Start > Settings > System > Display.

    2. Scroll down the Scale and layout section.

    3. Verify Change the size of text, apps, and other items is set to 100% (Recommended). If it is set to another size, click the drop-down arrow and then select 100% (Recommended).

    4. Close the Display settings.

  • Disable IE Enhanced Security Configuration setting (all supported versions of Windows Server):

    Disable (Off) the IE Enhanced Security Configuration setting in Windows Server. To view and configure this setting, do the following:

    1. In Windows Server, open the Server Manager.

    2. Select Local Server.

    3. If IE Enhanced Security Configuration is set to On, select it to configure it, and then proceed to step 4. If it is set to Off, no further configuration is required and you can close the Server Manager.

    4. On the Internet Explorer Enhanced Security Configuration dialog, set Administrators and Users to Off.

    5. Select OK.

Datasets

A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific set of fields in addition to the standard dataset fields. The table below describes these fields (assuming the name of the created and assigned dataset is theDataset).

Name Data Type Return Value
theDataset.WindowClass Text Returns the class of the window that was opened.
theDataset.WindowHandle Number Returns the unique handle of the window that was opened.
theDataset.WindowTitle Text Returns the title of the window that was opened.

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

This sample task opens a web browser to www.google.com and then displays the newly opened browser's window title, window handle, and window class in a message dialog. The last step ends the session and closes the web browser.

Copy
<AMVARIABLE NAME="theHandle" VALUE="" />
<AMVARIABLE NAME="theClass" VALUE="" />
<AMVARIABLE NAME="theTitle" VALUE="" />
<AMWEBBROWSER URL="www.google.com" BROWSER="firefox" SESSION="BrowserSession1" WINDOWCLASSVARIABLE="theClass" WINDOWTITLEVARIABLE="theTitle" WINDOWHANDLEVARIABLE="theHandle" />
<AMSHOWDIALOG WINDOWTITLE="Browser Window Properties">Title of browser window - %theTitle%Class of browser window - %theClass%Handle of browser window - %theHandle%</AMSHOWDIALOG>
<AMWEBBROWSER ACTIVITY="close" SESSION="BrowserSession1" />