Skip to main content

Web_find and web_image_check function example and Usage

Web_find and Web_Image_check function are used to find the specified text in the response of the HTML page. This function is only support in HTTP/HTML protocol based script. You should need to make sure that do the following changes in the run time settings before you use these two functions.

Go to Vuser -> Run-time Settings
Go to internet Protocol -> Preferences
Select the “Enable Image and Text Check” check box.
Web_find and web_image_check  will throw an error if the text or image does not found in the response.
For example if you want to set error when some text found. Then use the following example.

Example:
web_reg_find("Text=404", "Fail=Found", LAST);

If you do not want to throw an error regardless of the condition then use web_reg_save_param function with "Notfound=warning" option.

Example:

web_reg_save_param("NameCheck", "LB=Hi", "RB=Welcome to Loadrunner","Notfound=warning", LAST);

Web_find and web_image_check do not give the number of occurrences of the text/image. To find this we can use web_reg_find function. In web_reg_find we have “Save Count” option with this we can find out the totoal number of occurrences of text/image. web_find and web_image_check is only for  HTTP/HTML scripts. web_reg_find can be used with both  HTTP/HTML and URL based scripts.

Example:

web_reg_find("Text=loadrunner", "SaveCount=loadrunner_count", LAST);

Comments

Popular posts from this blog

File operations in loadrunner with examples

In this post I will explain how to capture a value from server response and save to a text file using vugen. How to capture and save to text file using loadrunner: First I have recorded the script using bing.com and then i searched for IBM. We will get 10 results. I have captured all the 10 values and saved to a file. Here is the code for that.

NeoLoad Interview Questions and Answers

Here are some of the interview questions and answers on NeoLoad: What is NeoLoad? NeoLoad is a performance testing tool designed to test different types of web, standalone and mobile applications. What is the difference between Loadrunner, JMeter and NeoLoad? Click here for differences What are the different counters you monitor in NeoLoad? Average Response Time(requests), average response time(pages), average requests/s, average throughput, current response time(requests), current response time(pages), current requests, current throughput, current users count, controller cpu load, controller memory load etc. What are the different type of tools you can integrate with NeoLoad? App Dynamics, CA APM Integration, Dyna trace integration, HP ALM or Quality Center Integration, Java and Jamo Solutions M-eux Test Integration, Jenkins Integration, perfecto mobile integration, selenium integration. What are the different type of Operating systems you can mon