Skip to content

Duplicated UIA List element issues #391

@ferpasri

Description

@ferpasri

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 :/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions