Search in sources :

Example 1 with SWTBotBrowser

use of org.eclipse.swtbot.swt.finder.widgets.SWTBotBrowser in project epp.mpc by eclipse.

the class AbstractMarketplaceWizardBotTest method marketplaceBrowser.

protected SWTBotBrowser marketplaceBrowser() {
    SWTWorkbenchBot wbBot = new SWTWorkbenchBot();
    Matcher<IEditorReference> marketplaceBrowserMatch = allOf(WidgetMatcherFactory.<IEditorReference>withPartId("org.eclipse.ui.browser.editor"), WidgetMatcherFactory.<IEditorReference>withTitle(containsString("Marketplace")));
    SWTBotEditor browserEditor = wbBot.editor(marketplaceBrowserMatch);
    SWTBotBrowser browser = browserEditor.bot().browser();
    return browser;
}
Also used : SWTWorkbenchBot(org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot) SWTBotEditor(org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor) SWTBotBrowser(org.eclipse.swtbot.swt.finder.widgets.SWTBotBrowser) IEditorReference(org.eclipse.ui.IEditorReference)

Example 2 with SWTBotBrowser

use of org.eclipse.swtbot.swt.finder.widgets.SWTBotBrowser in project epp.mpc by eclipse.

the class MarketplaceWizardTest method checkMarketplaceBrowser.

private void checkMarketplaceBrowser() {
    SWTBotBrowser browser = marketplaceBrowser();
    tryWaitForBrowser(browser);
    String url = browser.getUrl();
    assertTrue(url.contains("://marketplace.eclipse.org/content/"));
    // wizard is still open
    assertTrue(wizardShell.isOpen());
    // but no longer the active shell
    assertFalse(wizardShell.isActive());
}
Also used : SWTBotBrowser(org.eclipse.swtbot.swt.finder.widgets.SWTBotBrowser)

Aggregations

SWTBotBrowser (org.eclipse.swtbot.swt.finder.widgets.SWTBotBrowser)2 SWTWorkbenchBot (org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot)1 SWTBotEditor (org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor)1 IEditorReference (org.eclipse.ui.IEditorReference)1