Open Web Page Action Icon

Open Web Page

Declaration

<AMOPENWEBPAGE URL="text" WAIT="yes/no" WINDOWTITLEVARIABLE="text [variablename]" WINDOWCLASSVARIABLE="text [variablename]" WINDOWHANDLEVARIABLE="text [variablename]" RESULTDATASET="text" />

See Also

Web Browser, Send Email, HTTP Download, Ping, HTTP Post, Send IM, Twitter

Description

Opens a web page at the specified address (example: http://www.networkautomation.com) using the default browser. Works best with Microsoft Internet Explorer, which allows the action to detect when the page is finished loading before moving onto the next step.

Practical Usage

When used with Internet Explorer this action both loads the web page and waits until the page is finished loading. This is of special value when a load time value is required, or keys need to be sent to the web page only after it is finished loading. This action can be used to perform load testing, site testing, or automated form completion.

NOTE: If you simply need to download a file or retrieve the contents of a page (the web browser does not need to be displayed), it would be better to use the HTTP Get action. Similarly, if you need to post values to a web form and do not wish to go through the browser, it may be better to use the native HTTP Post action  to perform this.

Parameters

General Tab

Web Page to Open

Text, Required
MARKUP: PAGE="http://www.networkautomation.com"

Specifies the web page or URL that should be loaded. The web page will open in the default web browser. This value can be any URL that is valid to the current web browser.

Wait for Web Page to Finish Loading

Yes/No, Optional, Default: YES
MARKUP: WAIT="YES"

Specifies that the step should wait for the web page to finish loading before moving on to the next step. This works with Microsoft Internet Explorer only and is especially useful if you wish to record the amount of time it takes for the page to load or need to send keystrokes <AMSENDKEYS> or mouse clicks <AMMOUSE> to the page in subsequent steps.

Advanced Tab

Populate Variable with Window Title

Text [variablename], Optional, Default: (blank)
MARKUP: WINDOWTITLEVARIABLE="MyVariableName"

Specifies the name of an already existing variable that should receive the title of the window that was opened.

Populate Variable with Window Class

Text [variablename], Optional, Default: (blank)
MARKUP: WINDOWCLASSVARIABLE="MyVariableName"

Specifies the name of an already existing variable that should receive the class of the window that was opened.

Populate Variable with Window Handle

Text [variablename],  Optional, Default: (blank)
MARKUP: WINDOWHANDLEVARIABLE="MyVariableName"

Specifies the name of an already existing variable that should receive the handle of the window that was opened.

Create and Populate Dataset

Text, Optional, Default: (blank)
MARKUP: RESULTDATASET="DatasetName"

Specifies the name of a dataset to be created and populated with data from the window that was opened. In addition to the standard dataset fields, the dataset will contain the following:

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMOPENWEBPAGE URL="http://www.networkautomation.com" WINDOWTITLEVARIABLE="VariableName" /> 

<AMOPENWEBPAGE URL="http://www.networkautomation.com" WAIT="NO" RESULTDATASET="DatasetName" />