action #47222
openSupport named needle match areas
0%
Description
Currently, assert_and_click() only clicks in the final match area of the matching needle. If a given UI is being tested thoroughly, it’s quite possible that you’ll want to click on multiple things from the same window in order to test different features. Currently, this requires multiple needles with the same image and different JSON, which means more pain when updating the needles, and larger git repositories.
If it was possible to add an ID or name to each area in a needle, a new version of assert_and_click() could click in the match area with a given name, rather than clicking in the final match area.
This is somewhat possible at the moment by copying the implementation of assert_and_click() and making it use a match area other than the final one, but it’s only possible to index the match areas numerically, rather than by name. Any custom name put into the JSON doesn’t make it into the Perl needle object.
Updated by okurz over 4 years ago
- Priority changed from Normal to Low
- Target version set to future
In the meantime the need for this was slightly reduced with github.com/os-autoinst/openQA/pull/2054 adding support for clicking on specific coordinates as specified in the needle editor.