Use action coord to help Element path exact match
The original ElementEvaluator path_exact_match uses selectors to indicate if the element of an input action matches that of an evaluation step.
The shortcomings are:
- It's hard for pixel or coordinate-based agents to identify a selector to the correct element.
- The original code has a bad implementation: it traces up at most 3 times for the parent of the reference selector at a max depth of 3, if the input selector does not match the reference selector in the evaluation step.
In this PR, I use an alternative way:
- Calculate the bounding box of the reference selector
- See if the coordinate of action taken by agents is inside the bounding box. If so, means exact match; otherwise, means not match.
What this PR does not include:
- Implement how to acquire the coordinate of actions for coordinate or pixel-based agents. They need to add "input_coords" argument when calling the "step_evaluate" function. e.g. here in evaluate_utils.py
Note (not sure if it exists in data): For some cases, the reference element selector needs relabeling, such that the reference element selector's bounding box covers all pixel space which can lead to correct action.
This may occur when the reference selector in the evaluation step is the "deepest". For example, if the reference selector points to a huge button with a small text on it, and the reference selector in the evaluation step points to the text. Clicking the blank spaces of the button may fail this coordinate based eval.