New to Telerik Test Studio? Download free 30-day trial

Create Advanced Test Verifications

An advanced verification allows you to interactively build verification rules and validate them against a live web document or WPF application. In order to create custom verification you need to locate the target element in the DOM tree and use the Step Builder and its Verification section.

1.  Create a Web Test and click Record.

2.  Navigate to www.bing.com

3.  Enter Telerik in the search box and click the Search button.

4.  Enable hover over highlighting by clicking Highlight Element in the Test Studio Dev Recorder.

5.  Choose Build Step... from the context menu which will locate the element in the DOM tree and display the available options in the Step Builder to add a custom step.

Locate Element

6.  Select the Verifications tab in the Step Builder.

Verifications

7.  Start by selecting a type of available Verifications for the selected element:

  • IsVisible
  • Content
  • Attributes
  • Style
  • IsEnabled
  • Image

Available verifications

When crafting verifications, content is dynamically built against the currently selected element. As selections are made, default values are populated according to values the element contains. For example, choose Content as the verification type and three menu options appear.

Content

Click on the drop downs for each option to see a list of possible values.

Content Type Match Type

8.  Once finished building the verification(s), click Add Step to add it as a step to the current test.

Add Step

The newly created verification appears in the test:

Test Steps

We recommend against using the Content Markup validation types. They are fragile in the face of minor page changes, and different browsers may reorder the element attributes making them unreliable. For more information please see our Automated Testing blog entry on Understanding Validation Content Element Types.

In this article