@Listen("onTimer = #timer") public void printVisibleWindows() { List<Component> popupList = Selectors.find(getPage(), "popup"); List<Component> windowList = Selectors.find( getPage(), "window[mode='modal'][visible=true], window[mode='overlapped'][visible=true]"); System.out.println(popupList.size() + " popup"); System.out.println(windowList.size() + " window"); popupList = Selectors.find(getPage(), "popup"); int visibleCount = 0; for (Component c : popupList) { Popup p = (Popup) c; if (p.isVisible()) { visibleCount++; } } System.out.println(visibleCount + " visible popup"); }