JavaScript Functions > Alphabetical Listing of Web Functions > web.url

web.url

Loads the specified Web page (GET request).

Syntax

web.url( {object} );

JavaScript Object

{  
    stepName:"<string>",
    url:"<string>",
    ftpAscii:"<string>",
    targetFrame:"<string>",
    recContentType:"<string>",
    referer:"<string>",
    resource:"<string>",
    resourceByteLimit:"<string>",
    snapshot:"<string>",
    mode:"<string>",
    userAgent:"<string>",
    "extraRes":[  
        {  
        url:"<string>",
        referer:"<string>"
        }
    ]
}
Property Name
Description
stepName
The label of the step. Also used as the transaction name for automatic transactions.
url
The URL (Uniform resource Locator) of the Web page to load. The URL may be any of the following protocols: HTTP, HTTPS, or FTP. For authentication purposes, include both the user name and the password in the url property using the following format: ftp://username:password@server/dir/path.
ftpAscii "1" to perform an FTP transfer in ASCII mode, "0" for binary mode.
targetFrame The name of the frame containing the current link or resource. Click targetframe for more information.
recContentType The content–type of RESPONSE header during recording, for example, text/html, application/x–javascript. It is read to determine whether the target URL is a recordable resource. Click reccontentType for more information.
referer The URL of the page that referred to the current page. If the location was explicitly expressed, this attribute is omitted.
resource 0 – the URL is not a resource
1 – the URL is a resource
resourceByteLimit Click resourceByteLimit for more information.
snapshot The file name of the snapshot file (inf extension).
mode The Recording Level: HTML or HTTP. Click Recording Level / mode (Web) for more information.
userAgent Identifies a component other than the browser that will execute the step, for example, an ActiveX component running under the browser. This user agent header is sent for the requests made by the step. No check is made to confirm that the user agent argument matches the browser's User-Agent Run-Time Setting. Non-browser steps do not affect the emulated browser context, nor do they build a new context from the result.
extraRes Resources to download with the page.

Return Values

Not applicable

Parameterization

The following argument(s) can be parameterized using standard parameterization: List of Attributes

General Information

The web.url function is an action function that loads the Web page (GET request) specified by the url argument. (Each Web action Function in a script causes the browser to display a new Web page or frame. All Web action functions can be recorded by VuGen.) The web.url function does not require a context.

web.url is recorded only when VuGen is in either url–based recording mode, or in HTML–based recording mode with the A script containing explicit URLs only option checked (see VuGen's Recording Options).

You can use web.url to simulate the download of a file from an FTP server. The web.url function causes the server to perform the same tasks as if a file were actually being downloaded. The download is done in binary mode, unless "ftpAscii=1" is specified.

Examples of non–HTML–generated resources are .gif and .jpg images. The List of resource Attributes is only inserted when the recording option for these resources is set at Record within the current script step. This is the default setting. See the Virtual User Generator User Guide.

The HTTP header can be modified to pass additional information about the request to the server. Using HTTP headers you can, for example, allow other content types in the response such as compressed files, or you can request a Web page only on certain conditions. To modify the HTTP header in the request, see web.addHeader. To modify all subsequent requests, see web.addAutoHeader.

Example

web.url(
    {
        name : 'kalimanjaro', 
        url : 'http://kalimanjaro/', 
        targetFrame : '', 
        resource : 0, 
        recContentType : 'text/html', 
        referer : '', 
        snapshot : 't1.inf', 
        mode : 'HTML'
    }
);