* Click dropdown button at menu
* @param selector
* @param string
*/
public void clickDropdownButtonMenu(String buttonSelector, String menuLabel) {
JQuery jq = jq(buttonSelector);
mouseOver(jq);
clickAt(jq, "30, 0");
waitResponse();
JQuery menus = jq(".z-menu-popup:visible .z-menu-item .z-menu-item-cnt");
int size = menus.length();
if (size == 0)
throw new RuntimeException("menu item not found: " + menuLabel);
for (int i = 0; i < size; i++) {
JQuery menu = jq(".z-menu-popup:visible .z-menu-item .z-menu-item-cnt:eq(" + i + ")");
if (menu.text().indexOf(menuLabel) >= 0) {
click(menu.parent());
return;
}
}
throw new RuntimeException("menu item not found: " + menuLabel);
}