log.println("Couldn't find a point with contains");
continue;
}
// trying the point laying on child
XAccessible xAcc = oObj.getAccessibleAtPoint
(new Point(chBnd.X , chBnd.Y));
if (xAcc == null) {
log.println("The child not found at point ("
+ (chBnd.X ) + "," + chBnd.Y + ") - FAILED");
result = false;
} else {
XAccessible xAccCh = (XAccessible) UnoRuntime.queryInterface
(XAccessible.class, children[i]);
log.println("Child found at point ("
+ (chBnd.X ) + "," + chBnd.Y + ") - OK");
boolean res = util.AccessibilityTools.equals(xAccCh, xAcc);
if (!res) {
int expIndex = xAccCh.getAccessibleContext().getAccessibleIndexInParent();
int gotIndex = xAcc.getAccessibleContext().getAccessibleIndexInParent();
if (expIndex < gotIndex) {
log.println("The children found is not the same");
log.println("The expected child " +
xAccCh.getAccessibleContext().getAccessibleName());
log.println("is hidden behind the found Child ");
log.println(xAcc.getAccessibleContext().getAccessibleName()+" - OK");
} else {
log.println("The children found is not the same - FAILED");
log.println("Expected: "
+xAccCh.getAccessibleContext().getAccessibleName());
log.println("Found: "
+xAcc.getAccessibleContext().getAccessibleName());
result = false ;
}
}
}
// trying the point NOT laying on child
xAcc = oObj.getAccessibleAtPoint
(new Point(chBnd.X - 1, chBnd.Y - 1));
if (xAcc == null) {
log.println("No children found at point ("
+ (chBnd.X - 1) + "," + (chBnd.Y - 1) + ") - OK");
result &= true;
} else {
XAccessible xAccCh = (XAccessible) UnoRuntime.queryInterface
(XAccessible.class, children[i]);
boolean res = util.AccessibilityTools.equals(xAccCh, xAcc);
if (res) {
log.println("The same child found outside "
+ "its bounds - FAILED");