Note: This topic applies to Web Vuser protocols only. 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:
Several additional functions can be used for searching for text:
The web_find function, primarily used for backward compatibility, 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.
The web_global_verification function allows you to search the data of an entire business process. In contrast to web_reg_find, which only applies 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.
The web_global_verification function 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).