use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class MetadataPageTest 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 CreaterepoResourceChangeListenerTest method setUpBeforeClass.
/**
* Initialize the bot.
*/
@BeforeClass
public static void setUpBeforeClass() {
bot = new SWTWorkbenchBot();
monitor = new NullProgressMonitor();
try {
bot.shell(ICreaterepoTestConstants.MAIN_SHELL).activate();
} catch (WidgetNotFoundException e) {
// cannot activate main shell, continue anyways
}
TestUtils.openResourcePerspective(bot);
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class CreaterepoGeneralPropertyPageTest 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 CreaterepoPreferencePageTest 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
}
}
use of org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot in project linuxtools by eclipse.
the class TestCreateSystemtapScript method beforeClass.
@BeforeClass
public static void beforeClass() {
SWTBotPreferences.TIMEOUT = 20000;
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
e.printStackTrace();
}
prepareTreeSettings();
// Set SystemTap IDE perspective.
bot.perspectiveByLabel("SystemTap IDE").activate();
bot.sleep(5000);
for (SWTBotShell sh : bot.shells()) {
if (sh.getText().contains("SystemTap IDE")) {
mainShell = sh;
sh.activate();
bot.sleep(500);
break;
}
}
// Dismiss "Systemtap not installed" dialog(s) if present.
try {
SWTBotShell shell = bot.shell("Cannot Run SystemTap").activate();
shell.close();
shell = bot.shell("Cannot Run SystemTap").activate();
shell.close();
} catch (WidgetNotFoundException e) {
// ignore
}
// Create a Systemtap project.
clickMainMenu("File", "New", "Project...");
SWTBotShell shell = bot.shell("New Project");
shell.setFocus();
shell.bot().text().setText("Project");
bot.waitUntil(new NodeAvailableAndSelect(bot.tree(), "General", "Project"));
bot.button("Next >").click();
bot.textWithLabel("Project name:").setText(SYSTEMTAP_PROJECT_NAME);
bot.button("Finish").click();
bot.waitUntil(Conditions.shellCloses(shell));
projectExplorer = bot.viewByTitle("Project Explorer");
projectExplorer.setFocus();
projectExplorer.bot().tree().select(SYSTEMTAP_PROJECT_NAME).contextMenu("Go Into").click();
}
Aggregations