Skip to main content

Element Grouping

tip

UI Coverage is a paid add-on. Schedule a demo today and see how easy it is to enhance your testing while speeding up your development process.

When multiple elements on a page have the same behavior, testing each element individually is not always required to ensure confidence and coverage. In many cases, interacting with just one of these elements is sufficient to verify their collective behavior. For example, options in a dropdown may be grouped if only one of the options should be tested in order to verify their behavior.

UI Coverage groups elements that are related to one another through structural or behavioral hints. A group of elements is considered one element when it comes to scoring, and interacting with any element in the group will cause all elements in the group to be considered tested (e.g. clicking one treats all of them as having been clicked).

Grouping Rules​

  • Elements are grouped by elementgroups.md configuration if defined.
  • label elements are grouped with the form elements with which they are associated.
  • Elements within table rows are grouped with elements that share common attributes or are in the same position in other rows of the table.
  • Elements that are repeated in the DOM and share common attributes.
  • Elements that are repeated in the DOM and have parent elements that share common attributes.
  • Links with similar href patterns are resolved to views.md and grouped by their corresponding view.