public void deleteContainers(String dockerServer, String containerName) { open(); ConnectionItem dockerConnection = getConnection(dockerServer); TreeItem dc = dockerConnection.getTreeItem(); dc.select(); dc.expand(); TreeItem containersItem = dc.getItem("Containers"); containersItem.select(); containersItem.expand(); for (TreeItem item : containersItem.getItems()) { if (item.getText().contains(containerName)) { item.select(); Menu contextMenu = new ContextMenu("Remove"); if (!contextMenu.isEnabled()) { new ContextMenu("Stop").select(); new WaitWhile(new JobIsRunning(), TimePeriod.LONG); item.select(); contextMenu = new ContextMenu("Remove"); } contextMenu.select(); new WaitUntil(new ShellWithTextIsAvailable("Confirm Remove Container"), TimePeriod.NORMAL); new PushButton("OK").click(); new WaitWhile(new JobIsRunning(), TimePeriod.LONG); } } }
public void build() { select(); Menu menu = new ShellMenu("Project", "Build Project"); if (menu.isEnabled()) { menu.select(); } new WaitWhile(new JobIsRunning(), TimePeriod.LONG); }