qweb
qweb copied to clipboard
Closest match parameter in text locator keywords
Is your feature request related to a problem? Please describe. In keywords such as Click Text, Input Text, Verify Text, Drop Down - it would be nice to have a "closest match" parameter for locating elements with text. Labels can be generated or change over time, which is not good to hard-code for in a UI test, so it would be nice to be able to match the text based on similarity, rather than an exact string.
Describe the solution you'd like
The keywords mentioned above would have a new parameter such as closest_match=True
that will use extra logic to compare the given text with the text found on the page. As an example, suppose there is an existing label on a page: Last/Group Name
. Using the closest_match=True
parameter would result in the following line working:
Input Text Last Name Doe closest_match=True
It would find that the string Last Name
is similar to the label on the screen Last/Group Name
.
There are more examples I can provide, so reply and let me know if I need to add more.
Additionally, another parameter could be added like closest_match_percent
which would alter how a closest match is rated, such as closest_match_percent=0.6
being a 60% match, where 0 is 0% and 1 is 100%.
Describe alternatives you've considered This is something that needs to be extended in the existing keywords, so it is not feasible to add the functionality in another custom keyword.
Additional context n/a