@Test public void testPropertiesContextMenu() throws Exception { openDialog(); // use index 1 since first tree is property page navigation tree SWTBotTree tree = mBot.tree(1); ContextMenuHelper.clickContextMenu(tree, "Add"); new NewPropertyInputDialogTestFixture("keyx", "valuex").inputData(); ContextMenuHelper.clickContextMenu(tree, "Add"); new NewPropertyInputDialogTestFixture("keyz", "valuez").inputData(); tree.getTreeItem("keyz").select(); ContextMenuHelper.clickContextMenu(tree, "Delete"); tree.unselect(); // delete should not show up when the selection is empty assertThat(SWTTestUtil.getMenuItems(tree).get("Delete"), nullValue()); mBot.button("OK").click(); Thread.sleep(WAIT_TIME); AbstractUIRunner.syncRun( new ThrowableRunnable() { @Override public void run() throws Throwable { assertDeployedStrategy( mStrategy, mEngine, StrategyState.STOPPED, "Strategy1", "Claz", "Lang", "c:\\path", true, ImmutableMap.of("keyx", "valuex")); } }); }