本文整理汇总了Java中org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences.PLAYBACK_DELAY属性的典型用法代码示例。如果您正苦于以下问题:Java SWTBotPreferences.PLAYBACK_DELAY属性的具体用法?Java SWTBotPreferences.PLAYBACK_DELAY怎么用?Java SWTBotPreferences.PLAYBACK_DELAY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences
的用法示例。
在下文中一共展示了SWTBotPreferences.PLAYBACK_DELAY属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializePreferences
/**
* 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;
}
示例2: setUp
/**
* 每个测试开始之前执行
*/
@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));
}
示例3: initializeBotPreferences
/**
* Initialize the bot's preferences.
*/
public static void initializeBotPreferences() {
// NOTE: the keyboard layout must match the keyboard used for the OS.
// The default keyboard layouts are: EN_US, MAC_EN_US, EN_GB, MAC_EN_GB, FR_FR, DE_DE.
// TF-69: "com.avaloq.test.swtbot.DE_CH" is a custom keyboard layout, saved in the package "com.avaloq.test.swtbot"
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
SWTBotPreferences.KEYBOARD_STRATEGY = System.getProperty("org.eclipse.swtbot.keyboard.strategy", "org.eclipse.swtbot.swt.finder.keyboard.SWTKeyboardStrategy");
SWTBotPreferences.PLAYBACK_DELAY = PLAYBACK_DELAY;
SWTBotPreferences.TIMEOUT = TIMEOUT;
}
示例4: startTest
@BeforeClass
public static void startTest() {
if (DEBUG_MODE == 2) {
SWTBotPreferences.PLAYBACK_DELAY = 500;
}
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
bot = HSBot.bot();
}
示例5: updateCopy
protected ESPrimaryVersionSpec updateCopy() {
SWTBotPreferences.PLAYBACK_DELAY = 100;
didUpdate = false;
final ESUpdateObserver updateObserver = createUpdateObserver();
ESWorkspaceProviderImpl.getInstance();
ESWorkspaceProviderImpl.getObserverBus().register(updateObserver);
UIThreadRunnable.asyncExec(new VoidResult() {
public void run() {
final UIUpdateProjectController updateProjectController = new UIUpdateProjectController(
bot.getDisplay().getActiveShell(),
getCopy());
updateProjectController.execute();
}
});
final Matcher<Shell> matcher = withText("Update");
bot.waitUntil(waitForShell(matcher));
bot.button("OK").click();
bot.waitUntil(new DefaultCondition() {
// BEGIN SUPRESS CATCH EXCEPTION
public boolean test() throws Exception {
return didUpdate;
}
// END SUPRESS CATCH EXCEPTION
public String getFailureMessage() {
return "Update did not succeed.";
}
}, timeout());
ESWorkspaceProviderImpl.getInstance();
ESWorkspaceProviderImpl.getObserverBus().unregister(updateObserver);
return getCopy().getBaseVersion();
}
示例6: beforeClass
@BeforeClass
public static void beforeClass() throws Exception {
bot = new SWTWorkbenchBot();
realFactory = VizServiceFactoryHolder.getFactory();
factoryHolder = new VizServiceFactoryHolder();
// Set the bot's timeout and playback rate
SWTBotPreferences.TIMEOUT = 3000;
SWTBotPreferences.PLAYBACK_DELAY = 250;
// Set up the workspace
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
// The OS's file path separator
String separator = System.getProperty("file.separator");
String projectName = "CSVVizService";
java.net.URI defaultProjectLocation = null;
// Setup the project
try {
// Get the project handle
IProject project = workspaceRoot.getProject(projectName);
// If the project does not exist, create it
if (!project.exists()) {
// Set the location as
// ${workspace_loc}/CAEBATModelTesterWorkspace
defaultProjectLocation = (new File(
System.getProperty("user.home") + separator + "ICETests"
+ separator + projectName)).toURI();
// Create the project description
IProjectDescription desc = ResourcesPlugin.getWorkspace()
.newProjectDescription(projectName);
// Set the location of the project
desc.setLocationURI(defaultProjectLocation);
// Create the project
project.create(desc, null);
}
// Open the project if it is not already open
if (project.exists() && !project.isOpen()) {
project.open(null);
}
// Refresh the workspace
project.refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
// Catch exception for creating the project
e.printStackTrace();
fail();
}
}
示例7: updateToVersion
protected ESPrimaryVersionSpec updateToVersion() {
SWTBotPreferences.PLAYBACK_DELAY = 100;
didUpdate = false;
final ESUpdateObserver updateObserver = createUpdateObserver();
ESWorkspaceProviderImpl.getInstance();
ESWorkspaceProviderImpl.getObserverBus().register(updateObserver);
UIThreadRunnable.asyncExec(new VoidResult() {
public void run() {
final UIUpdateProjectToVersionController updateProjectController = new UIUpdateProjectToVersionController(
bot.getDisplay().getActiveShell(),
getCopy());
updateProjectController.execute();
}
});
Matcher<Shell> matcher = withText("Select a Version to update to");
bot.waitUntil(waitForShell(matcher));
bot.button("OK").click();
matcher = withText("Update");
bot.waitUntil(waitForShell(matcher));
bot.button("OK").click();
bot.waitUntil(new DefaultCondition() {
// BEGIN SUPRESS CATCH EXCEPTION
public boolean test() throws Exception {
return didUpdate;
}
// END SUPRESS CATCH EXCEPTION
public String getFailureMessage() {
return "Update to version did not succeed.";
}
}, 600000);
ESWorkspaceProviderImpl.getInstance();
ESWorkspaceProviderImpl.getObserverBus().unregister(updateObserver);
return getCopy().getBaseVersion();
}