releng: Add SWTBot integration tests for import wizard
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.ui.swtbot.tests / shared / org / eclipse / tracecompass / tmf / ui / swtbot / tests / shared / SWTBotUtils.java
index 48f24b5c9824a0491d0f5e7eac01b871fb2ad7de..b402c6b04e2b57d1c3c0ab85ce579b75f94297de 100644 (file)
@@ -552,6 +552,26 @@ public final class SWTBotUtils {
         return (TmfEventsEditor) editorPart;
     }
 
+    /**
+     * Returns the child tree item of the specified item at the given sub-path.
+     * The project element labels may have a count suffix in the format ' [n]'.
+     *
+     * @param bot
+     *            a given workbench bot
+     * @param parentItem
+     *            the parent tree item
+     * @param path
+     *            the desired child element sub-path (without suffix)
+     * @return the a {@link SWTBotTreeItem} with the specified name
+     */
+    public static SWTBotTreeItem getTraceProjectItem(SWTBot bot, final SWTBotTreeItem parentItem, final String... path) {
+        SWTBotTreeItem item = parentItem;
+        for (String name : path) {
+            item = getTraceProjectItem(bot, item, name);
+        }
+        return item;
+    }
+
     /**
      * Returns the child tree item of the specified item with the given name.
      * The project element label may have a count suffix in the format ' [n]'.
This page took 0.025295 seconds and 5 git commands to generate.