Create Advanced Test Verifications
Custom Verifications are created from the Sentence Verification Builder dialog. It allows you to interactively build verification rules and validate them against a live web document or WPF application.
The Sentence Verification Builder has three main sections:
- Target Element - shows the complete element in HTML or XAML.
- Available Verifications - populated with buttons for each type of verification that can be applied to a given element.
- Selected Sentences - used to build the individual verification rules.
- Reopen the Element Menu and click Build Verification.
- The Verification Builder offers sentence-based verifications of elements. Start by selecting a type of 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. Click on the down arrow next to each option to see a list of possible values.
Each sentence has three options available, highlighted in red above.
- Confirm the verification by clicking the Verification icon.
- Locate the current element in the DOM tree by clicking the Locate in DOM icon.
- Delete or start over by clicking the Delete icon.
- Verifications can be crafted to verify many different values, styles, or attributes of an element. Craft multiple sentences by selecting a type and filling in the verification criteria.
Note: Each sentence will add a separate verification step.
- Once finished building the verification(s), click OK to add it as a step to the current test.
Note: 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.