@PublicAtsApi public void rightClick( int rowIndex, String... contextMenuItems ) { new SwingElementState(this).waitToBecomeExisting(); JTreeFixture treeFixture = (JTreeFixture) SwingElementLocator.findFixture(this); JPopupMenuFixture popUpMenu = treeFixture.showPopupMenuAt(rowIndex); popUpMenu.menuItemWithPath(contextMenuItems).click(); }
@PublicAtsApi public void rightClick( String[] path, String... contextMenuItems ) { new SwingElementState(this).waitToBecomeExisting(); JTreeFixture treeFixture = (JTreeFixture) SwingElementLocator.findFixture(this); expandTree(treeFixture, path); // sometimes it is necessary JPopupMenuFixture popUpMenu = treeFixture.showPopupMenuAt(buildPath(path)); popUpMenu.menuItemWithPath(contextMenuItems).click(); }