Skip to content

Conversation

@zzjchen
Copy link

@zzjchen zzjchen commented Oct 24, 2024

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:

  1. It's hard for pixel or coordinate-based agents to identify a selector to the correct element.
  2. The original code has a bad implement: 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 evaluation step.

In this PR, I use an alternative way:

  • Calculate the bounding box of reference selector
  • See if the the coordinate of action taken by agents is inside the bounding box. If so, means exact match; otherwise, means not match.

Note (not sure if it exists in data):
Perhaps for some case, the reference element selector needs relabeling, such that the reference element selector's bounding box covers all pixel space that 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant