|
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" />
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 webpage is finished loading before moving onto the next step. To end a session, use the Web Browser - Close activity.
- 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.
- The browser you specify must be updated to the latest version and installed on the target system to ensure the Web Browser action functions correctly.
- Unlike other session-based actions where sessions are optional, the use of a session in the Web Browser action is required as each created session explicitly links to a specific web browser instance. A session is created using the Web Browser - Create session or Web Browser - Open activity. Numerous sessions are supported within a single task, however, since Web Browser actions are performed interactively (and not in the background), each session must run concurrently to avoid sending interactions to the wrong browser window.
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 |
|
Specifies the browser to open. The following options are available:
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.helpsystems.com or https://www.helpsystems.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. IMPORTANT: Before using the Enable IE mode parameter with your tasks, review the Using the Edge Browser with IE Mode Enabled (Enable IE mode) in Automate: Known Limitations and Required Updates and Configurations section. |
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 11 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 ![]() NOTE:
|
Additional Notes
Using the Edge Browser with IE Mode Enabled (Enable IE mode) in Automate: Known Limitations and Required Updates and Configurations
Known Limitations
Required Updates and Configurations
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
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
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 box. The last step ends the session and closes the web browser.
<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" />