This feature enables you to validate whether page is rendering fine in the browser or not. During recording, application records position and size of all the elements in the page and while executing the test compares the recorded position/size with the replayed ones. If the position of any element is displaced or if size of element has changed more than the specified tolerance limit then application treats it as a failure.
To add rendering validations in your test, please follow the steps bellow.
Select Tools -> Options from menu bar.
Select Check Box Show Options to perform rendering Validation in the options dialog box.
Select Tab Elements Captured for Rendering Validation
Select the elements for which you wish to validate the size / position attributes from the table provided. Application will record position / size for all the elements which are selected in this table.
To record rendering validation data for page loaded in the browser, click on the button next to stop recording button in the recording tool bar. This will capture the rendering validation data for all the configured elements on that page.
Once you are done with recording, you can add rendering validation for all the pages for which you have captured the rendering data.
Select the URL in the Editor tree for which you captured the rendering data and need to add the rendering validation.
Select the validation tab and click on add new validation button on right side of table.
Select the validation type as Page Validation in the define validation dialog box and click on Next.
In the next step there are two check boxes :
a) Validate change in position/displacement of elements : You can configure Displacement Tolerance here. (If the element has displaced by more than tolerance % it will be treated as failed case).
b) Validate change in size (width/height) of elements : You can configure Size change tolerance here. (If width / height of the element has changed more than the tolerance limit it will be treated as failed case).
Click on finish. You are done adding rendering validation for the selected URL.
You need to make sure that page has rendered completely before validation is performed.
In cases where the AJAX requests are involved and browser continues updating the page even after page load is done, you need to use enough think time Or alternatively apply "Wait for text" to judge that page has completely loaded.
Rendering validation works only for static pages because it needs X-path of each of the elements for which rendering information is collected to be same, both during recording as well as replaying.
Test recorded on one machine for rendering validation may not work when tried to replay on some other machine, because the position attributes may change when rendered on other machine with different resolution or browser version.