Web Image

 Image check in LoadRunner

The image check is used to check if an image is present in the server response for a specific page, as the name implies. While image verification only confirms the content of images, text verification is often used to examine the existence of a specific word or phrase on a web page. Either a text check or an image check must be performed for each web page in the script. You read in the previous post how to add a text control. This article covers how to insert Image Check into the LoadRunner script.

Note: while text checks can be performed both during and after recording, image checks can only be added after recording. The option to add a video verification while the script is being recorded is not available.

How can I add an image check to the LoadRunner script after burning?

  1. You must know the alt or src attributes of the image on the web page to add an image check in the script. Follow the steps below to get the alt or src attributes of the image:
    • A. Launch the online browser;
    • B. Right-click on the image;
    • C. Click “Inspect” (in Chrome); “Inspect Element” (in Internet Explorer and Firefox);
LoadRunner Image Check - Web Tour

Figure 01 – ‘Inspect’ option in Chrome

https://www.perfmatrix.com/wp-content/uploads/2020/01/LoadRunner_Content_Check_Image_Check_Web_Tour_02.png

Figure 02

  • Copy the alt or src value, if applicable. Note that the alt value in the snapshot below is empty, which requires copying the src value “image/webtours.png”. Anyone who can help you.
https://www.perfmatrix.com/wp-content/uploads/2020/01/LoadRunner_Content_Check_Image_Check_Web_Tour_03.png

                 Image: 03

2. Visit the script for the Vuser.

3. In the Editor, find the place where the image control should be inserted.

4. To open the Steps Toolbox, select View from the menu, then choose Steps Toolbox (or press Ctrl+Alt+B).

5. Type ‘web_image_check’ in the steps toolbox.

6. The ‘web_image_check’ function will be displayed in the search results. Click on it twice.

7. In the “Image Control Properties” dialog box, enter the alt or src value.

LoadRunner Image Check - Function

                 Image: 04

8. Click ‘OK’ to add the function to the Vuser script.

LoadRunner Image Check - Function

                 Image: 05

Before running the script again, make sure the ‘Enable image and text verification’ box is checked.

Internet Protocol -> Preferences -> Audits -> Runtime Settings Enables text and image inspections.

LoadRunner Content Check - Image Check Runtime Settings

                 Image: 06

Scroll to Top