
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 :/
The UIA_ListControlTypeId element is created or detected twice by the UIAutomation API or the TESTAR UIA internals:
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.
TESTAR_dev/windows/src/org/testar/monkey/alayer/windows/ElementMap.java
Lines 48 to 69 in ad9dc43
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 :/