Java Code Examples for org.netbeans.jemmy.operators.JPopupMenuOperator#setComparator()
The following examples show how to use
org.netbeans.jemmy.operators.JPopupMenuOperator#setComparator() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ActionNoBlock.java From netbeans with Apache License 2.0 | 6 votes |
/** * performs action through popup menu * * @param component component to be action performed on * @throws UnsupportedOperationException when action does not support popup * mode */ @Override public void performPopup(ComponentOperator component) { if (popupPath == null) { throw new UnsupportedOperationException(getClass().toString() + " does not define popup path"); } // Need to wait here to be more reliable. // TBD - It can be removed after issue 23663 is solved. new EventTool().waitNoEvent(500); component.clickForPopup(); JPopupMenuOperator popup = new JPopupMenuOperator(component); popup.setComparator(getComparator()); popup.pushMenuNoBlock(popupPath, "|"); try { Thread.sleep(AFTER_ACTION_WAIT_TIME); } catch (Exception e) { throw new JemmyException("Sleeping interrupted", e); } }
Example 2
Source File: WidgetOperator.java From netbeans with Apache License 2.0 | 5 votes |
/** * Performs popup action on this widget. * * @param popupPath path of popup menu item (e.g. 'Go|Next') */ public void performPopupAction(String popupPath) { Point center = getCenter(); getViewOperator().clickForPopup(center.x, center.y); JPopupMenuOperator popupOper = new JPopupMenuOperator(); popupOper.setComparator(getComparator()); popupOper.pushMenu(popupPath, "|", getComparator()); }
Example 3
Source File: WidgetOperator.java From netbeans with Apache License 2.0 | 5 votes |
/** * Performs popup action on this widget and no block further execution. * * @param popupPath path of popup menu item (e.g. 'Go|Next') */ public void performPopupActionNoBlock(String popupPath) { Point center = getCenter(); getViewOperator().clickForPopup(center.x, center.y); JPopupMenuOperator popupOper = new JPopupMenuOperator(); popupOper.setComparator(getComparator()); popupOper.pushMenuNoBlock(popupPath, "|", getComparator()); }