installCustomWebResolver - Samples

When defining a CustomWebResolver you can use one of the resolvers for web frameworks shipped with QF-Test as a basis. The following procedure call shows an example of how to enhance the resolver for the Angular Material framework.

Additionally to the preconfigured mappings for the Angular Material framework it maps

  • all GUI elements with the css class angButton to a QF-Test component of the generic class Button,
  • all elements with the css class tc to TableCell, but only, if its direct parent has the QF-Test class TableRow,
  • all nodes with an id attribute matching the regular expression .*list (so everything which ends with list) to a QF-Test component with the generic class List.

QF-Test will handle the attribute qfs-id as if this were the id (used as QF-Test name and as id in the extra features table in the details of the 'Component' node).

QF-Test will handle the attribute specific of a node as its id, but only if one of the ancestor nodes has the generic class Panel:TitledPanel (so only inside panels with a label).

UI elements with the tags div or span will not be recorded for the component hierarchy if the elements have not been mapped otherwise.

Extends the Angular Material resolver.
resolver angular
genericClasses angButton=Button,tc=TableCell@::parent=TableRow
attributesToGenericClasses id=%.*list=List
ignoreTags DIV,SPAN
customIdAttributes qfs-id,specific@::ancestor=Panel:TitledPanel