use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class ImportRPMsPageTest method setUpBeforeClass.
/**
* Initialize the test project.
*
* @throws CoreException
*/
@BeforeClass
public static void setUpBeforeClass() throws CoreException {
testProject = new TestCreaterepoProject();
assertTrue(testProject.getProject().exists());
bot = new SWTWorkbenchBot();
try {
bot.shell(ICreaterepoTestConstants.MAIN_SHELL).activate();
} catch (WidgetNotFoundException e) {
// cannot activate main shell, continue anyways
}
monitor = new NullProgressMonitor();
TestUtils.openResourcePerspective(bot);
navigator = TestUtils.enterProjectFolder(bot);
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class RepoFormEditorTest method setUpBeforeClass.
/**
* Initialize the test project.
*
* @throws CoreException
*/
@BeforeClass
public static void setUpBeforeClass() throws CoreException {
testProject = new TestCreaterepoProject();
assertTrue(testProject.getProject().exists());
bot = new SWTWorkbenchBot();
try {
bot.shell(ICreaterepoTestConstants.MAIN_SHELL).activate();
} catch (WidgetNotFoundException e) {
// cannot activate main shell, continue anyways
}
TestUtils.openResourcePerspective(bot);
navigator = TestUtils.enterProjectFolder(bot);
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class CreaterepoDeltaPropertyPageTest method setUpBeforeClass.
/**
* Initialize the test project.
*
* @throws CoreException
*/
@BeforeClass
public static void setUpBeforeClass() throws CoreException {
testProject = new TestCreaterepoProject();
assertTrue(testProject.getProject().exists());
bot = new SWTWorkbenchBot();
testProject.restoreDefaults();
try {
bot.shell(ICreaterepoTestConstants.MAIN_SHELL).activate();
} catch (WidgetNotFoundException e) {
// cannot activate main shell, continue anyways
}
TestUtils.openResourcePerspective(bot);
navigator = TestUtils.enterProjectFolder(bot);
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class AbstractSWTBotTest method setUpWorkbench.
@BeforeClass
public static void setUpWorkbench() throws Exception {
SWTWorkbenchBot bot = new SWTWorkbenchBot();
try {
bot.viewByTitle("Welcome").close();
// hide Subclipse Usage stats popup if present/installed
bot.shell("Subclipse Usage").activate();
bot.button("Cancel").click();
} catch (WidgetNotFoundException e) {
// ignore
}
// Set C/C++ perspective.
bot.perspectiveByLabel("C/C++").activate();
bot.sleep(500);
for (SWTBotShell sh : bot.shells()) {
if (sh.getText().startsWith("C/C++")) {
sh.activate();
bot.sleep(500);
break;
}
}
// Turn off automatic building by default to avoid timing issues
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceDescription desc = workspace.getDescription();
boolean isAutoBuilding = desc.isAutoBuilding();
if (isAutoBuilding) {
desc.setAutoBuilding(false);
workspace.setDescription(desc);
}
projectExplorer = bot.viewByTitle("Project Explorer");
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class AbstractSWTBotTest method compareWithEachOther.
/**
* Compare The selected items in PROJ_NAME with each other
* @param The name of a tree item to select
* @param The name of a second tree item to select
*/
public void compareWithEachOther(String first, String second) {
SWTWorkbenchBot bot = new SWTWorkbenchBot();
enterProjectFolder(bot);
// Refresh and Select
SWTBotTree treeBot = projectExplorer.bot().tree();
treeBot.contextMenu("Refresh").click();
treeBot.select(new String[] { first, second });
// Workaround for context menu on multiple selections
click(ContextMenuHelper.contextMenu(treeBot, "Compare With", "Each Other"));
exitProjectFolder(bot);
}
Aggregations