Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated UIA List element issues #391

Open
ferpasri opened this issue May 6, 2024 · 0 comments
Open

Duplicated UIA List element issues #391

ferpasri opened this issue May 6, 2024 · 0 comments

Comments

@ferpasri
Copy link
Member

ferpasri commented May 6, 2024

UIAListFromComboBox

The UIA_ListControlTypeId element is created or detected twice by the UIAutomation API or the TESTAR UIA internals:

  • Once correctly as a child of the Font Window
  • Other incorrectly as independent Window

This provokes TESTAR to create duplicate widgets in the state of the applications, which subsequently provokes 2 other issues.

Potential issue hovering widgets in spy mode

In some Windows applications, this duplicated behavior may provoke users not to be able to hover over the desired widget that is on top of the state.

private static class ElementComp implements Comparator<UIAElement>{
final static int WORSE = 1, BETTER = -1, EVEN = 0;
public int compare(UIAElement o1, UIAElement o2) {
if(o1.zindex < o2.zindex){
return WORSE;
}else if (o1.zindex > o2.zindex){
return BETTER;
}else{
if(o1.rect != null){
if(o2.rect != null){
double area1 = Rect.area(o1.rect);
double area2 = Rect.area(o2.rect);
return area1 < area2 ? BETTER : (area1 > area2 ? WORSE : EVEN);
}else{
return BETTER;
}
}else{
return WORSE;
}
}
}
}

Duplicated actions

In #221 , we added a feature to only derive, by default, the actions in the top-level widgets of the state. This default functionality allows TESTAR to derive only 1 set of actions per List dropdown. However, if we derive the actions in all the widgets of the state, TESTAR will derive a set of actions in each List dropdown, which is duplicated :/

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

No branches or pull requests

2 participants