本文整理汇总了Java中org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem.getText方法的典型用法代码示例。如果您正苦于以下问题:Java SWTBotTreeItem.getText方法的具体用法?Java SWTBotTreeItem.getText怎么用?Java SWTBotTreeItem.getText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem
的用法示例。
在下文中一共展示了SWTBotTreeItem.getText方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: hasErrorsInProblemsView
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; //导入方法依赖的package包/类
public static boolean hasErrorsInProblemsView(SWTWorkbenchBot bot) {
// Open Problems View by Window -> show view -> Problems
bot.menu("Window").menu("Show View").menu("Problems").click();
SWTBotView view = bot.viewByTitle("Problems");
view.show();
SWTBotTree tree = view.bot().tree();
for (SWTBotTreeItem item : tree.getAllItems()) {
String text = item.getText();
if (text != null && text.startsWith("Errors")) {
return true;
}
}
return false;
}
示例2: hasErrorsInProblemsView
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; //导入方法依赖的package包/类
/**
* Returns true if there are errors in the Problem view. Returns false otherwise.
*/
public static boolean hasErrorsInProblemsView(SWTWorkbenchBot bot) {
// Open Problems View by Window -> show view -> Problems
bot.menu("Window").menu("Show View").menu("Problems").click();
SWTBotView view = bot.viewByTitle("Problems");
view.show();
SWTBotTree tree = view.bot().tree();
for (SWTBotTreeItem item : tree.getAllItems()) {
String text = item.getText();
if (text != null && text.startsWith("Errors")) {
return true;
}
}
return false;
}
示例3: execute
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; //导入方法依赖的package包/类
@Test
public void execute() {
SWTBotTree tree = bot.tree();
final SWTBotTreeItem orderTreeItem = tree.getTreeItem(CreateTempOrderRule.ORDER_NUMBER_TEMP);
expandTreeItem(orderTreeItem);
generateInitialViewDocuForOrderOverview();
SWTBotTreeItem firstPositionNode = orderTreeItem.getItems()[0];
SWTBotMenu menu = getContextMenuAndGenerateDocu(tree, firstPositionNode, "Edit Position");
LOGGER.info(menu.toString());
clickMenuEntryAndGenerateDocu(menu, PageName.POSITION_DETAIL);
String articleName = firstPositionNode.getText();
String editorTitle = CreateTempOrderRule.ORDER_NUMBER_TEMP + " - " + articleName + " - " + POSITION_STATE;
LOGGER.info("select Position Editor: " + editorTitle);
SWTBotView partByTitle = wbBot.partByTitle(editorTitle);
Assert.assertNotNull(partByTitle);
LOGGER.info("part: " + partByTitle.getPart().toString());
selectArticleAndGenerateDocu(articleName);
saveAllAndGenerateDocu();
// close order details
partByTitle.close();
generateDocu("check if part was closed", PageName.POSITION_DETAIL);
LOGGER.info(getClass().getSimpleName() + " successful!");
}
开发者ID:scenarioo,项目名称:scenarioo-example-swtbot-e4,代码行数:33,代码来源:ChangeArticleUpdatesTheOrderOverviewTest.java