public void enterDetails() { if (Widgets.get(596, 70).click(true)) { Time.sleep(100, 200); Keyboard.sendText(Squeal.getCurrentId(), false); } if (Widgets.get(596, 76).click(true)) { Time.sleep(100, 200); Keyboard.sendText(Squeal.getCurrentSerial(), false); } }
/** * Interacts with this option, using either the mouse or the keyboard. * * @param key <tt>true</tt> if and only if the keyboard should be used, <tt>false</tt> otherwise. * @return -1 if the mouse failed to interact, 0 is the keyboard was used (regardless of success!) * or +1 if the mouse successfully interacted. */ public int select(final boolean key) { if (key) { Keyboard.sendText(number == -1 ? " " : Integer.toString(number), false); return 0; } else { return child.click(true) ? 1 : -1; } }