web_link
Emulates a mouse click on the link that is defined by the attributes.
C Language
int web_link( constchar *StepName, <List of Attributes>, [EXTRARES, <List of Resource Attributes>,] LAST);
Java Language
int object.link( String stepName, String textName, String[] argumentList );
Argument | Description |
---|---|
object | An expression evaluating to an object of type WebApi. Usually web for Java. See also Function and Constant Prefixes. |
StepName | The name of the link in the tree view. Also used as the transaction name for automatic transactions. |
List of Attributes | The following attributes are supported: Text: The exact text that appears in the hypertext link. Frame: The name of the frame in which you recorded the operation. The name of the frame is the value of the name attribute of the FRAME element. ResourceByteLimit, and Recorded Attributes: Text: The exact text that appears in the hypertext link. |
EXTRARES | A demarcation parameter indicating that the next parameter will be a list of resource attributes. |
List of Resource Attributes | |
LAST | A marker that indicates the end of the argument list. |
Return Values
This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.
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 the link that is defined by the attributes. (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_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 List of Resource Attributes 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 Help Center (select the relevant version).
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_add_header. To modify all subsequent requests, see web_add_auto_header.
The function web_link is supported for web scripts.