当前位置: 首页>>代码示例>>Java>>正文


Java SWTBotPreferences.KEYBOARD_LAYOUT属性代码示例

本文整理汇总了Java中org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences.KEYBOARD_LAYOUT属性的典型用法代码示例。如果您正苦于以下问题:Java SWTBotPreferences.KEYBOARD_LAYOUT属性的具体用法?Java SWTBotPreferences.KEYBOARD_LAYOUT怎么用?Java SWTBotPreferences.KEYBOARD_LAYOUT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences的用法示例。


在下文中一共展示了SWTBotPreferences.KEYBOARD_LAYOUT属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:27,代码来源:CoreSwtbotTools.java

示例2: testDeChKeyboardLayout

/**
 * 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);
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:19,代码来源:DeChKeyboardLayoutTest.java

示例3: 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));
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:19,代码来源:MergeSegmentsTest.java

示例4: beforeClass

@BeforeClass
public static void beforeClass() throws Exception {
	SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
	SWTBotPreferences.TIMEOUT = 10000;
	bot = new SWTWorkbenchBot();
	try {
		bot.viewByTitle("Welcome").close();
	} catch (Exception e) {
		e.printStackTrace();
	}

}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:12,代码来源:GW4EPerspectiveTestCase.java

示例5: 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;
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:12,代码来源:SwtBotUtil.java

示例6: setUp

/**
	 * 每个测试开始之前执行
	 */
	@Before
	public void setUp() {
//		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 = "prjBot-001";
		fileName = "HSCAT8-2T.xlf";
		ProjectTreeView.doubleClickXlfFile(prjName, fileName);
		xe = new XlfEditor(bot.editorByTitle(fileName));
	}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:17,代码来源:SplitSegmentTest.java

示例7: startTest

@BeforeClass
public static void startTest() {
	if (DEBUG_MODE == 2) {
		SWTBotPreferences.PLAYBACK_DELAY = 500;
	}
	SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
	bot = HSBot.bot();
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:8,代码来源:TestDemos.java

示例8: EditorConfigTestContext

public EditorConfigTestContext(final SWTWorkbenchBot bot, final String projectName) {
	this.bot = bot;
	this.projectName = projectName;
	closeWelcomePageIfPresent();
	createJavaProjectIfNotExists(projectName);
	configureEditors();
	SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
}
 
开发者ID:ncjones,项目名称:editorconfig-eclipse,代码行数:8,代码来源:EditorConfigTestContext.java

示例9: setSWTBotPreferences

/**
 * Use the Properties file to set Preferences: KEYBOARD_STRATEGY,
 * KEYBOARD_LAYOUT, TIMEOUT
 * 
 * @return isSWTBotPreferencesSet
 */
public static boolean setSWTBotPreferences() {
	SWTBotPreferences.KEYBOARD_STRATEGY = Properties.KEYBOARD_STRATEGY_ORG_ECLIPSE_SWTBOT_SWT_FINDER_KEYBOARD_SWT_KEYBOARD_STRATEGY;
	SWTBotPreferences.KEYBOARD_LAYOUT = Properties.KEYBOARD_LAYOUT_EN_US;
	SWTBotPreferences.TIMEOUT = Properties.TIME_OUT;
	return true;
}
 
开发者ID:Tharshayene,项目名称:DevStudioUITestAutomation,代码行数:12,代码来源:SetUp.java

示例10: setupBot

@BeforeClass
public static void setupBot() {
  bot = new SWTWorkbenchBot();
  SWTBotPreferences.KEYBOARD_LAYOUT = EN_US;
  closeWelcomeView();
}
 
开发者ID:sealuzh,项目名称:PerformanceHat,代码行数:6,代码来源:AbstractSwtBotTest.java

示例11: setUp

@Before
	public void setUp() {
//		SWTBotPreferences.PLAYBACK_DELAY = 500;
		SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
		bot = new HsSWTWorkbenchBot();
	}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:6,代码来源:CursorPosition.java


注:本文中的org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences.KEYBOARD_LAYOUT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。