Working with the Searching Criteria


As you probably already know, Maveryx is able to inspect the AUT’s UI at runtime and recognize the UI’s objects to perform tests’ actions. The Maveryx component responsible for the runtime objects’ recognition is the GUI Object Finder.
Using Maveryx, you can configure the GUI Object Finder through the
SearchingStrategyPlugInSettings.xml file in your MAVERYX_HOME/bin folder.

This XML file allows setting:
1) the searching criteria to find the GUI objects;
2) the evaluation functions’ parameters to estimate the tests’ objects found and to disambiguate in case of multiple objects.

You can add your own searching criteria and evaluation functions, which best fit your application’s domain, by implementing the relevant interfaces…but this is another story!

Maveryx comes by default with three searching criteria:
a) NameRole
b) AssociatedTooltip
c) AssociatedLabel

NameRole allows locating a GUI object by its name and/or role.
The name is the object’s label or caption, the role is the function the object plays in the UI.

AssociatedTooltip allows locating a GUI object through its tooltip.
AssociatedLabel allows locating a GUI object to test through its label.
In the previous example, in the function, you can use the tooltip or the label instead of the name.

Each criterion has two main properties: WEIGHT and IS_ACTIVE.

IS_ACTIVE = true means that the criterion is enabled, false implies the opposite.
WEIGHT = float number that specifies the criterion importance. This value is used by the GUI Object Finder to calculate the score of each candidate

Each criterion has a set of rules and two main properties: FACTOR and IS_ACTIVE.

For example, the NameRole criteria has the ExactMatch rule active and its FACTOR is “1”.




IS_ACTIVE = true means that the rule is enabled, false implies the opposite.
FACTOR = float number that specifies the rule weight. This value is used by the GUI Object Finder to calculate the score of each candidate.

So, basically, you can modify the searching criteria and their rules by modifying these two attributes. Obviously, how to change these parameters depends on your goal and experience with Maveryx.

Each candidate object retrieved by the GUI Object Finder, applying the given criteria and rules, has a score. An Evaluation Function calculates which one of these objects is the best candidate to perform (eventually) the tests’ actions on it.

It is also possible to change the Evaluation Function parameters, but we will get to that another time. If you are interested in knowing more about the topic of this post or the Evaluation Function in general, just add your comments here.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.