Open topic with navigation
Emulates a mouse click on the image that is defined by the attributes.
int web_image( constchar *StepName, <List of Attributes>, [EXTRARES, <List of Resource Attributes>,] LAST );
int object.image( String StepName, String  argumentList );
ALT: The ALT attribute of the IMG element that defines the image. The ALT attribute appears in a bubble when pointing to the associated image, and as text before the image is loaded.
SRC: The SRC attribute of the IMG element that defines the image. Alternatively, the file name of the image. For example, button.gif. You can also specify SRC/SFX to specify a suffix for the image's path. All strings with that suffix will be considered a match.
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.
ALT is recorded if it exists, otherwise SRC is recorded. Ordinal is used for resolving ambiguity in both cases.
ResourceByteLimit: Click ResourceByteLimit for more information.
The following attributes apply to server–side image maps only (although the coordinates of the click are not "attributes", the attribute format is used for them):
This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure.
The following argument(s) can be parameterized using standard parameterization: List of Attributes
The web_image action function emulates a mouse click on the image that is defined by the attributes. This function may be executed only in the context of a previous operation.
web_image is recorded only when VuGen is in HTML–based recording mode (see VuGen's Recording Options).
The web_image function supports both client–side and server–side image maps. See the List of Attributes above for those attributes that are specific to client–side and server–side image maps.
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 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_add_header. To modify all subsequent requests, see web_add_auto_header.
The function web_image is supported for all Web scripts.