Point pointToClick = getClickPoint(oper);
DriverManager.getMouseDriver(oper).
clickMouse(oper, pointToClick.x, pointToClick.y,
1, oper.getDefaultMouseButton(), 0,
oper.getTimeouts().create("ComponentOperator.MouseClickTimeout"));
KeyDriver kdriver = DriverManager.getKeyDriver(oper);
Timeout pushTimeout = oper.getTimeouts().create("ComponentOperator.PushKeyTimeout");
if(System.getProperty("java.specification.version").compareTo("1.3") > 0) {
while(coper.getSelectedIndex() != index) {
kdriver.pushKey(oper, (index > coper.getSelectedIndex()) ? KeyEvent.VK_DOWN : KeyEvent.VK_UP, 0, pushTimeout);
}
} else {
int current = ((ChoiceOperator)oper).getSelectedIndex();
int diff = 0;
int key = 0;
if(index > current) {
diff = index - current;
key = KeyEvent.VK_DOWN;
} else {
diff = current - index;
key = KeyEvent.VK_UP;
}
for(int i = 0; i < diff; i++) {
kdriver.pushKey(oper, key, 0, pushTimeout);
}
}
kdriver.pushKey(oper, KeyEvent.VK_ENTER, 0, pushTimeout);
}