Support named needle match areas
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.