Understanding Web Text Check Functions
Note: Applies to: web Vuser protocols
For a list of web Vuser protocols, see Web Vuser Types.
When you add a text check to a web Vuser script, VuGen adds a web_reg_find function to the script. This function registers a search for a text string in an HTML page. Registration means that the Vuser does not execute the search immediately—rather the Vuser performs the check only after executing the next Action function, such as web_url.
Note: If you are working with a concurrent functions group, the web_reg_find function is executed only at the end of the grouping.
In the following example, the web_reg_find function searches for the text string "Welcome". If the string is not found, the next action function fails and the script execution stops.
web_reg_find("Text=Welcome", "Fail=Found", LAST);
web_url("Step", "URL=...", LAST);
In addition to the web_reg_find function, you can use other functions to search for text within an HTML page including:
This function is used primarily used for backward compatibility. web_find differs from the web_reg_find function in that web_find is limited to HTML-based scripts (see Recording Options > Recording tab). It also has less attributes, such as instance, allowing you to determine the number of times the text appeared. When performing a standard text search, web_reg_find is the preferred function.
This function lets you search the data of an entire business process. In contrast to web_reg_find, which applies only to the next Action function, this function applies to all subsequent Action functions such web_url. By default, the scope of the search is NORESOURCE, searching only the HTML body, excluding headers and resources.
web_global_verification is ideal for detecting application level errors that are not included the HTTP status codes. This function is not limited to an HTML-Based script (see Recording Options > Recording tab).