Good day, I have a ENTER ShortcutListener attached to a TextField. Is it possible to call this listener from tests, e.g. by calling UI.keyPress(ENTER) or something similar - similar to Button.click? Thanks
Sometimes the easiest approach is the right one Instead of navigating through the ActionManager hierarchy, I just remember the shortcut listener in the component’s field; the component has an additional method which simply calls the shortcut listener:
void fireEnterKeypress() {
if (enterShortcutRegistrator != null) {
enterShortcutRegistrator.handleAction(null, null);
}
}