Java源码示例:org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences
示例1
/**
* 每个测试开始之前执行
*/
@Before
public void setUp() {
if (SLOW_PLAYBACK) {
SWTBotPreferences.PLAYBACK_DELAY = 500;
}
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
INVISIBLE_CHAR = XlfEditor.INVISIBLE_CHAR;
reTag = "(" + INVISIBLE_CHAR + "\\d+)?" + INVISIBLE_CHAR + "(x|bx|ex|g|bpt|ept|mrk|sub|ph|it)" + INVISIBLE_CHAR + "(\\d+" + INVISIBLE_CHAR + ")?";
bot = HSBot.bot();
bot.closeAllEditors();
ts = TS.getInstance();
prjName = "swtBot-Project-001";
fileName = "HSCAT8-3.xlf";
ProjectTreeView.doubleClickXlfFile(prjName, fileName);
xe = new XlfEditor(bot.editorByTitle(fileName));
}
示例2
/**
* Sets common SWTBot preferences.
*/
public static void initializePreferences() {
// -Dorg.eclipse.swtbot.playback.delay=2
SWTBotPreferences.PLAYBACK_DELAY = BOT_PLAYBACK_DELAY;
// System.setProperty("org.eclipse.swtbot.keyboardLayout", "EN_US");
SWTBotPreferences.KEYBOARD_LAYOUT = "org.eclipse.swtbot.swt.finder.keyboard.EN_US";
// SWTBot Keyboard strategies
SWTBotPreferences.KEYBOARD_STRATEGY = "org.eclipse.swtbot.swt.finder.keyboard.SWTKeyboardStrategy";
// keyboard type interval
SWTBotPreferences.TYPE_INTERVAL = KEYBOARD_TYPE_INTERVAL;
// Waiting for Widgets
SWTBotPreferences.TIMEOUT = BOT_WIDGET_TIMEOUT;
// screenshot directory
SWTBotPreferences.SCREENSHOTS_DIR = System.getProperty(SWTBotPreferenceConstants.KEY_SCREENSHOTS_DIR, "target/screenshots");
// test window focus policy
workbenchFocusPolicy = WorkbenchFocusPolicy.valueOf(System.getProperty(PROPERTY_COM_AVALOQ_TEST_WORKBENCHFOCUSPOLICY, WorkbenchFocusPolicy.REFOCUS.toString()));
preferencesInitialized = true;
}
示例3
/**
* Tests com.avaloq.test.swtbot.DE_CH.
*/
@Test
public void testDeChKeyboardLayout() {
SWTBotPreferences.KEYBOARD_LAYOUT = "com.avaloq.test.swtbot.DE_CH";
SWTBotPreferences.KEYBOARD_STRATEGY = "org.eclipse.swtbot.swt.finder.keyboard.MockKeyboardStrategy";
SwtWorkbenchBot bot = new SwtWorkbenchBot();
bot.closeWelcomePage();
bot.menu("File").menu("New").menu("Untitled Text File").click();
SWTBotEclipseEditor editor = bot.activeEditor().toTextEditor();
editor.setFocus();
editor.typeText(EXPECTED_RESULT);
String actualResult = editor.getText();
bot.closeAllEditors();
assertEquals("Written and read characters must exactly match", EXPECTED_RESULT, actualResult);
}
示例4
/**
* Initialization
*/
@BeforeClass
public static void beforeClass() {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBot Thread"); // for the debugger
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
fBot = new SWTWorkbenchBot();
/* finish waiting for eclipse to load */
WaitUtils.waitForJobs();
SWTBotUtils.createProject(PROJET_NAME);
}
示例5
/**
* Test Class setup
*/
@BeforeClass
public static void init() {
SWTBotUtils.initialize();
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 300000; /* 300 second timeout */
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
fBot = new SWTWorkbenchBot();
SWTBotUtils.closeView("welcome", fBot);
/* Switch perspectives */
SWTBotUtils.switchToPerspective(NETWORK_PERSPECTIVE_ID);
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
}
示例6
/**
* Things to setup
*/
@BeforeClass
public static void beforeClass() {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBotTest");
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
SWTBotUtils.openView(CustomChartStubView.ID);
CustomChartStubView.setChartProvider(CHART_PROVIDER);
}
示例7
/**
* Things to setup
*/
@Before
public void before() {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBotTest");
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 10000; /* 10 second timeout */
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
fBot = new SWTWorkbenchBot();
loadXmlFile();
openTrace();
openView(VIEW_NAME);
}
示例8
/**
* Things to setup
*/
@BeforeClass
public static void beforeClass() {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBotTest");
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
fBot = new SWTWorkbenchBot();
loadXmlFile();
openTrace();
}
示例9
/**
* Things to setup
*/
@Before
public void beforeClass() {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBotTest");
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 60000; /* 60 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
SWTWorkbenchBot bot = new SWTWorkbenchBot();
SWTBotUtils.closeView("welcome", bot);
/* Prepare the workspace */
prepareWorkspace();
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
/* Create project */
SWTBotUtils.createProject(PROJECT_NAME);
}
示例10
/**
* Before Class
*/
@BeforeClass
public static void beforeClass() {
SWTBotUtils.initialize();
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
fBot = new SWTWorkbenchBot();
SWTBotUtils.closeView("welcome", fBot);
/* Create the trace project */
SWTBotUtils.createProject(TRACE_PROJECT_NAME);
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
}
示例11
/**
* Before Class
*/
@BeforeClass
public static void beforeClass() {
SWTBotUtils.initialize();
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
fBot = new SWTWorkbenchBot();
/* Create the trace project */
SWTBotUtils.createProject(TRACE_PROJECT_NAME);
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
/* set up test trace */
setUpTrace();
}
示例12
/** Test Class setup */
@BeforeClass
public static void init() {
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
SWTBotUtils.initialize();
Thread.currentThread().setName(SWT_BOT_THREAD_NAME); // for the debugger
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
fBot = new SWTWorkbenchBot();
/* finish waiting for eclipse to load */
WaitUtils.waitForJobs();
}
示例13
/**
* Test Class setup
*/
@BeforeClass
public static void init() {
SWTBotUtils.initialize();
/* set up test trace */
URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(COLUMN_TRACE_PATH), null);
URI uri;
try {
uri = FileLocator.toFileURL(location).toURI();
fTestFile = new File(uri);
} catch (URISyntaxException | IOException e) {
fail(e.getMessage());
}
assumeTrue(fTestFile.exists());
/* Set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
fBot = new SWTWorkbenchBot();
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
}
示例14
/**
* Initialization, creates a temp trace
*
* @throws IOException
* should not happen
*/
@BeforeClass
public static void init() throws IOException {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBot Thread"); // for the debugger
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
SWTWorkbenchBot bot = new SWTWorkbenchBot();
/* finish waiting for eclipse to load */
WaitUtils.waitForJobs();
fLocation = File.createTempFile("sample", ".xml");
try (BufferedRandomAccessFile braf = new BufferedRandomAccessFile(fLocation, "rw")) {
braf.writeBytes(TRACE_START);
for (int i = 0; i < NUM_EVENTS; i++) {
braf.writeBytes(makeEvent(i * 100, i % 4));
}
braf.writeBytes(TRACE_END);
}
SWTBotUtils.createProject(PROJET_NAME);
SWTBotUtils.selectTracesFolder(bot, PROJET_NAME);
}
示例15
/**
* Initialization, creates a temp trace
*
* @throws IOException
* should not happen
*/
@Before
public void init() throws IOException {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBot Thread"); // for the debugger
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
fBot = new SWTWorkbenchBot();
IEclipsePreferences defaultPreferences = InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID);
defaultPreferences.put(ITmfTimePreferencesConstants.TIME_ZONE, "GMT-05:00");
TmfTimestampFormat.updateDefaultFormats();
/* finish waiting for eclipse to load */
WaitUtils.waitForJobs();
fLocation = File.createTempFile("sample", ".xml");
try (BufferedRandomAccessFile braf = new BufferedRandomAccessFile(fLocation, "rw")) {
braf.writeBytes(TRACE_START);
for (int i = 0; i < NUM_EVENTS; i++) {
braf.writeBytes(makeEvent(i * 100, i % 4));
}
braf.writeBytes(TRACE_END);
}
}
示例16
/**
* Test Class setup
*/
@BeforeClass
public static void init() {
SWTBotUtils.initialize();
/* set up test trace */
URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(COLUMN_TRACE_PATH), null);
URI uri;
try {
uri = FileLocator.toFileURL(location).toURI();
fTestFile = new File(uri);
} catch (URISyntaxException | IOException e) {
fail(e.getMessage());
}
assumeTrue(fTestFile.exists());
/* Set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
fBot = new SWTWorkbenchBot();
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
}
示例17
/**
* Initialization, creates a temp trace
*
* @throws IOException
* should not happen
*/
@BeforeClass
public static void init() throws IOException {
IEclipsePreferences defaultPreferences = InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID);
defaultPreferences.put(ITmfTimePreferencesConstants.TIME_ZONE, "GMT-05:00");
TmfTimestampFormat.updateDefaultFormats();
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBot Thread"); // for the debugger
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
fBot = new SWTWorkbenchBot();
/* finish waiting for eclipse to load */
WaitUtils.waitForJobs();
fFileLocation = File.createTempFile("sample", ".xml");
try (BufferedRandomAccessFile braf = new BufferedRandomAccessFile(fFileLocation, "rw")) {
braf.writeBytes(TRACE_START);
for (int i = 0; i < 100; i++) {
braf.writeBytes(makeEvent(i * 100, i % 4));
}
braf.writeBytes(TRACE_END);
}
}
示例18
/**
* Set up the test context and environment
*/
@BeforeClass
public static void setUp() {
SWTBotUtils.initialize();
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 10000; /* 10 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fBot = new SWTWorkbenchBot();
SWTBotUtils.createProject(TRACE_PROJECT_NAME);
WaitUtils.waitForJobs();
final CtfTestTrace cygProfile = CtfTestTrace.CYG_PROFILE;
LttngUstTrace trace = LttngUstTestTraceUtils.getTrace(cygProfile);
fStart = ((CtfTmfTrace) trace).getStartTime().toNanos();
fFullRange = new TmfTimeRange(TmfTimestamp.fromNanos(fStart), TmfTimestamp.fromNanos(fStart + 100l));
final File file = new File(trace.getPath());
LttngUstTestTraceUtils.dispose(cygProfile);
SWTBotUtils.openTrace(TRACE_PROJECT_NAME, file.getAbsolutePath(), UST_ID);
SWTBotUtils.openView(FlameChartView.ID);
fViewBot = fBot.viewByTitle("Flame Chart");
WaitUtils.waitForJobs();
}
示例19
/**
* Test Class setup
*
* @throws Exception
* on error
*/
@BeforeClass
public static void init() throws Exception {
TestDirectoryStructureUtil.generateTraceStructure(TEST_TRACES_PATH);
SWTBotUtils.initialize();
/* Set up for SWTBot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
fBot = new SWTWorkbenchBot();
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
SWTBotUtils.createProject(TRACE_PROJECT_NAME);
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(TRACE_PROJECT_NAME);
fTracesFolder = new File(Objects.requireNonNull(TmfProjectRegistry.getProject(project, true).getTracesFolder()).getResource().getLocation().toOSString());
createCProject(C_PROJECT_NAME);
setTracingNature(C_PROJECT_NAME);
IProject cProject = ResourcesPlugin.getWorkspace().getRoot().getProject(C_PROJECT_NAME);
fCProjectFolder = cProject.getLocation().toFile();
}
示例20
/**
* Things to setup
*/
@BeforeClass
public static void beforeClass() {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBotTest");
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
fBot = new SWTWorkbenchBot();
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
}
示例21
/**
* Start the SWT bot test, register the LAMI analyses and open a trace (any
* trace) on a new project
*/
@BeforeClass
public static void beforeClass() {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBotTest");
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
OnDemandAnalysisManager.getInstance().registerAnalysis(LamiAnalyses.MULTIPLE_ROW.getAnalysis());
OnDemandAnalysisManager.getInstance().registerAnalysis(LamiAnalyses.MULTIPLE_SIMILAR_ROW.getAnalysis());
// Create the project and open the trace
String tracePath = TRACE.getFullPath();
SWTBotUtils.createProject(PROJECT_NAME);
SWTBotUtils.openTrace(PROJECT_NAME, tracePath, TRACE_TYPE);
WaitUtils.waitForJobs();
}
示例22
/**
* Initialization
*/
@BeforeClass
public static void init() {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBot Thread"); // for the debugger
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
sfLogger.removeAllAppenders();
sfLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
sfBot = new SWTWorkbenchBot();
SWTBotUtils.closeView("Statistics", sfBot);
/* finish waiting for eclipse to load */
WaitUtils.waitForJobs();
}
示例23
/**
* Before Class
*
* @throws IOException
* When the trace could not be opened
*/
@BeforeClass
public static void beforeClass() throws IOException {
SWTBotUtils.initialize();
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
fBot = new SWTWorkbenchBot();
SWTBotUtils.closeView("welcome", fBot);
/* Switch perspectives */
SWTBotUtils.switchToPerspective(KERNEL_PERSPECTIVE_ID);
/* Create the trace project */
SWTBotUtils.createProject(TRACE_PROJECT_NAME);
/* Open the trace */
String tracePath = FileUtils.toFile(FileLocator.toFileURL(CtfTestTrace.ARM_64_BIT_HEADER.getTraceURL())).getAbsolutePath();
SWTBotUtils.openTrace(TRACE_PROJECT_NAME, tracePath, KERNEL_TRACE_TYPE);
/* Finish waiting for eclipse to load */
SWTBotUtils.activateEditor(fBot, CtfTestTrace.ARM_64_BIT_HEADER.getTraceURL().getPath().replaceAll("/", ""));
}
示例24
/**
* Test Class setup
*/
@BeforeClass
public static void init() {
SWTBotUtils.initialize();
/* Set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
workbenchbot = new SWTWorkbenchBot();
/* Close welcome view */
SWTBotUtils.closeView("Welcome", workbenchbot);
/* Switch perspectives */
SWTBotUtils.switchToPerspective(KERNEL_PERSPECTIVE_ID);
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
}
示例25
/**
* Before Class
*/
@BeforeClass
public static void beforeClass() {
SWTBotUtils.initialize();
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
fBot = new SWTWorkbenchBot();
SWTBotUtils.closeView("welcome", fBot);
/* Switch perspectives */
SWTBotUtils.switchToPerspective(KERNEL_PERSPECTIVE_ID);
/* Create the trace project */
SWTBotUtils.createProject(TRACE_PROJECT_NAME);
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
}
示例26
/**
* Before Class
*
* @throws IOException
* If the traces can not be found
*/
@BeforeClass
public static void beforeClass() throws IOException {
SWTBotUtils.initialize();
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
fBot = new SWTWorkbenchBot();
SWTBotUtils.closeView("welcome", fBot);
/* Switch perspectives */
SWTBotUtils.switchToPerspective(KERNEL_PERSPECTIVE_ID);
/* Create the trace project */
SWTBotUtils.createProject(TRACE_PROJECT_NAME);
/* Finish waiting for eclipse to load */
WaitUtils.waitForJobs();
}
示例27
/**
* Initialization
*/
@BeforeClass
public static void init() {
SWTBotUtils.initialize();
Thread.currentThread().setName("SWTBot Thread"); // for the debugger
/* set up for swtbot */
SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
fLogger.removeAllAppenders();
fLogger.addAppender(new ConsoleAppender(new SimpleLayout()));
fBot = new SWTWorkbenchBot();
SWTBotUtils.closeView("welcome", fBot);
/* finish waiting for eclipse to load */
WaitUtils.waitForJobs();
SWTBotUtils.switchToPerspective(PERSPECTIVE_ID);
}
示例28
/**
* 每个测试开始之前执行
*/
@Before
public void setUp() {
if (SLOW_PLAYBACK) {
SWTBotPreferences.PLAYBACK_DELAY = 500;
}
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
INVISIBLE_CHAR = XlfEditor.INVISIBLE_CHAR;
reTag = "(" + INVISIBLE_CHAR + "\\d+)?" + INVISIBLE_CHAR + "(x|bx|ex|g|bpt|ept|mrk|sub|ph|it)" + INVISIBLE_CHAR + "(\\d+" + INVISIBLE_CHAR + ")?";
bot = HSBot.bot();
bot.closeAllEditors();
ts = TS.getInstance();
prjName = "swtBot-Project-001";
fileName = "HSCAT8-3.xlf";
ProjectTreeView.doubleClickXlfFile(prjName, fileName);
xe = new XlfEditor(bot.editorByTitle(fileName));
}
示例29
@Before
public void setUp() {
SWTBotPreferences.PLAYBACK_DELAY = 1000; // slow down tests...Otherwise we won't see anything
display = Display.getCurrent();
parent = createUI(display);
bot = new SWTBot(parent);
geoMapPositioned = geoMap = bot.widget(Is.isA(GeoMap.class));
geoMapBot = new SWTBotGeoMap(geoMap);
}
示例30
@Before
public void setUp() {
SWTBotPreferences.PLAYBACK_DELAY = 1000; // slow down tests...Otherwise we won't see anything
display = Display.getCurrent();
parent = createUI(display);
bot = new SWTBot(parent);
GeoMap geoMap = bot.widget(Is.isA(GeoMap.class));
geoMapBot = new SWTBotGeoMap(geoMap);
}