1 /*******************************************************************************
2 * Copyright (c) 2013 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Matthew Khouzam - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.ui
.swtbot
.tests
.conditions
;
15 import org
.eclipse
.jface
.wizard
.IWizardContainer
;
16 import org
.eclipse
.jface
.wizard
.IWizardPage
;
17 import org
.eclipse
.jface
.wizard
.Wizard
;
18 import org
.eclipse
.swtbot
.swt
.finder
.SWTBot
;
19 import org
.eclipse
.swtbot
.swt
.finder
.waits
.ICondition
;
22 * Is the wizard on the page you want?
23 * @author Matthew Khouzam
25 class WizardOnPage
implements ICondition
{
27 private final Wizard fWizard
;
28 private final IWizardPage fPage
;
30 public WizardOnPage(Wizard wizard
, IWizardPage desiredPage
) {
36 public boolean test() throws Exception
{
37 if (fWizard
== null || fPage
== null) {
40 final IWizardContainer container
= fWizard
.getContainer();
41 if (container
== null) {
44 IWizardPage currentPage
= container
.getCurrentPage();
45 return fPage
.equals(currentPage
);
49 public void init(SWTBot bot
) {
53 public String
getFailureMessage() {