web_find

web_find is a deprecated function and it has been replaced by the web_reg_find function. This function was limited to HTML-based recorded scripts. The web_find function was used to search a specified text string in an HTML page. One of the reasons to deprecate this function is its slowness. It searches the context only after the HTML request is complete which causes slower execution time than web_reg_find. The web_find function has been superseded in C Language scripts by web_reg_find, which runs faster and can be used in both HTML-based and URL-based recording. 

As mentioned above web_find is inserted after the HTML page where the text needs to be searched. Although web_reg_find is inserted before the page function where text needs to be searched.

Example: In the below example, the web_find function searches for the name ‘Web Tours’ in the index.html page.

web_url("index.html",
     "URL=http://127.0.0.1:1080/WebTours/index.html",
     "TargetFrame=",
     LAST );

web_find("Web Tours",
     "expect=notfound",
     "matchcase=yes",
     "onfailure=abort",
     "report=failure",
     "repeat=no",
     "what=John",
     LAST );

You may be interested:


Leave a Comment