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

web.link

Emulates a mouse click on the link that is defined by the attributes.

Syntax

web.link( {object} );

JavaScript Object

{  
   stepName:"<string>",
   text:"<string>",
   frame:"<string>",
   targetFrame:"<string>",
   resourceByteLimit:"<string>",
   ordinal:"<string>",
   snapshot:"<string>",
   "extraRes":[  
      {  
         url:"<string>",
         referer:"<string>"
      }
   ]
}
Property Name
Description
stepName
The name of the link in the tree view. Also used as the transaction name for automatic transactions.
text The exact text that appears in the hypertext link.
frame The value of the name attribute of the FRAME element in which you recorded the operation.
targetframe The name of the frame or a standard HTML frame specifier, such as "_blank"
resourceByteLimit A limit based on the accumulated size of the bodies of the resources on this Web page that have already been downloaded. Applies only to Sockets replay.
ordinal Used to uniquely identify elements whose selected attributes are identical.
snapshot The filename of the snapshot.
extraRes
Extra resources.
url The URL of the Web resource to load. The URL can be any of the following protocols: HTTP, HTTPS, or FTP. For authentication purposes, include both the user name and the password in the URL using the format: ftp://username:password@server/dir/path.
referer The URL of the referring Web page.

Return Values

Not applicable

Parameterization

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

General Information

The web.link function is an action function that emulates a mouse click on a link. The web.link function can be executed only in the context of a previous operation.

web.link is recorded only when VuGen is in HTML-based recording mode (see VuGen's Recording Options).

Examples of non-HTML-generated resources are .gif and .jpg images. The resources are only inserted when the recording option for these resources is set at "Record within the current script step." This is the default setting. Refer to 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 if certain conditions are met. To modify the HTTP header in the request see web.addHeader. To modify all subsequent requests, see web.addAutoHeader.

Example

web.link(
    {
        stepName : 'All kind of CGI\'s.', 
        text : 'All kind of CGI\'s.', 
        snapshot : 't2.inf'
    }
);