• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java WindowFinder类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中org.assertj.swing.finder.WindowFinder的典型用法代码示例。如果您正苦于以下问题:Java WindowFinder类的具体用法?Java WindowFinder怎么用?Java WindowFinder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

WindowFinder类属于org.assertj.swing.finder包,在下文中一共展示了WindowFinder类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testText

点赞 3

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
private void testText() {
        findMenuItemByText("Text...").click();
        DialogFixture dialog = WindowFinder.findDialog("filterDialog").using(robot);

        dialog.textBox("textTF").requireEditable().enterText("testing...");
        dialog.slider("fontSize").slideTo(250);

        dialog.checkBox("boldCB").check().uncheck();
        dialog.checkBox("italicCB").check();
//        dialog.checkBox("underlineCB").check().uncheck();
//        dialog.checkBox("strikeThroughCB").check().uncheck();
// TODO test the advanced settings dialog

        findButtonByText(dialog, "OK").click();
        keyboardUndoRedo();
        keyboardUndo();
    }
 

开发者ID:teddyted,
项目名称:iSeleda,
代码行数:18,
代码来源:AssertJSwingTest.java

示例2: testFilterWithDialog

点赞 3

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
private void testFilterWithDialog(String name, Randomize randomize, ShowOriginal showOriginal, String... extraButtonsToClick) {
    findMenuItemByText(name).click();
    DialogFixture dialog = WindowFinder.findDialog("filterDialog").using(robot);

    for (String buttonText : extraButtonsToClick) {
        findButtonByText(dialog, buttonText).click();
    }

    if (randomize == Randomize.YES) {
        findButtonByText(dialog, "Randomize Settings").click();
        findButtonByText(dialog, "Reset All").click();
        findButtonByText(dialog, "Randomize Settings").click();
    }

    if (showOriginal == ShowOriginal.YES) {
        dialog.checkBox("show original").click();
        dialog.checkBox("show original").click();
    }

    dialog.button("ok").click();

    keyboardUndoRedo();
    keyboardUndo();
}
 

开发者ID:teddyted,
项目名称:iSeleda,
代码行数:25,
代码来源:AssertJSwingTest.java

示例3: preferencesDialogShallBeOpenedByMnemonic

点赞 3

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
@Test
public void preferencesDialogShallBeOpenedByMnemonic() {

	MockUpUtils.setMockupPropertiesFile("mockups/empty.properties");
	MockUpUtils.setMockupMidoFile("mockups/empty.mido");
	startApplication();

	pressKeyOnMainFrame(KeyEvent.VK_ALT);
	pressAndReleaseKeysOnMainFrame(KeyEvent.VK_P);

	DialogFixture preferncesDialog = WindowFinder
			.findDialog(PreferencesDialog.NAME).using(robot)
			.requireVisible();
	preferncesDialog.close();
	pressAndReleaseKeysOnMainFrame(KeyEvent.VK_ALT);
}
 

开发者ID:aguelle,
项目名称:MIDI-Automator,
代码行数:17,
代码来源:MnemonicsFunctionalITCase.java

示例4: accomplishAs

点赞 2

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
public GenericTypeMatcher<JFrame> accomplishAs(Agent agent) {
    SwingAppDriver swingAppDriver = agent.usingThe(SwingAppDriver.class);
    Pause.pause(new ComponentFoundCondition("Waiting for Frame to load", swingAppDriver.robot().finder(), new GenericTypeMatcher<JFrame>(JFrame.class) {
        @Override
        protected boolean isMatching(JFrame frame) {
            return frame.getClass() == clazz;
        }
    }), swingAppDriver.getDefaultWaitingTimeout());
    FrameFixture window = WindowFinder.findFrame(frameMatcher).using(swingAppDriver.robot());
    agent.keepsInMind(rememberAsKey,window);
    return frameMatcher;
}
 

开发者ID:MagenTys,
项目名称:cherry-fest,
代码行数:13,
代码来源:FindFrame.java

示例5: onSetUp

点赞 2

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
protected void onSetUp() {
    ApplicationLauncher
            .application("pixelitor.Pixelitor")
            .withArgs((new File(INPUT_DIR, "a.jpg")).getPath())
            .start();
    window = WindowFinder.findFrame("frame0")
            .withTimeout(15, SECONDS)
            .using(robot);
    PixelitorWindow.getInstance().setLocation(0, 0);
}
 

开发者ID:teddyted,
项目名称:iSeleda,
代码行数:11,
代码来源:AssertJSwingTest.java

示例6: testRandomFilter

点赞 2

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
private void testRandomFilter() {
    findMenuItemByText("Random Filter...").click();
    DialogFixture dialog = WindowFinder.findDialog("filterDialog").using(robot);
    JButtonFixture nextRandomButton = findButtonByText(dialog, "Next Random Filter");
    JButtonFixture backButton = findButtonByText(dialog, "Back");
    JButtonFixture forwardButton = findButtonByText(dialog, "Forward");

    assertTrue(nextRandomButton.isEnabled());
    assertFalse(backButton.isEnabled());
    assertFalse(forwardButton.isEnabled());

    nextRandomButton.click();
    assertTrue(backButton.isEnabled());
    assertFalse(forwardButton.isEnabled());

    nextRandomButton.click();
    backButton.click();
    assertTrue(forwardButton.isEnabled());

    backButton.click();
    forwardButton.click();
    nextRandomButton.click();

    findButtonByText(dialog, "OK").click();
    keyboardUndoRedo();
    keyboardUndo();
}
 

开发者ID:teddyted,
项目名称:iSeleda,
代码行数:28,
代码来源:AssertJSwingTest.java

示例7: openPreferences

点赞 2

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
/**
 * Opens the preferences window.
 * 
 * @return The preferences window
 */
public static DialogFixture openPreferences() {

	window.menuItemWithPath(MainFrame.MENU_FILE,
			MainFrame.MENU_ITEM_PREFERENCES).click();

	return WindowFinder.findDialog(PreferencesDialog.NAME).using(robot);
}
 

开发者ID:aguelle,
项目名称:MIDI-Automator,
代码行数:13,
代码来源:GUIAutomations.java

示例8: openAddDialog

点赞 2

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
/**
 * Opens the add dialog
 * 
 * @return The add dialog as FrameFixtrue
 */
public static DialogFixture openAddDialog() {

	focusMidiAutomator();
	JPopupMenuFixture popupMenu = openFileListPopupMenu();
	popupMenu.menuItem(MainFramePopupMenu.NAME_MENU_ITEM_ADD).click();
	return WindowFinder.findDialog(AddDialog.NAME).using(robot);
}
 

开发者ID:aguelle,
项目名称:MIDI-Automator,
代码行数:13,
代码来源:GUIAutomations.java

示例9: openEditDialog

点赞 2

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
/**
 * Opens the edit dialog
 * 
 * @param index
 *            The index of the entry to edit
 * @return The edit dialog as FrameFixture
 */
public static DialogFixture openEditDialog(int index) {

	focusMidiAutomator();
	JPopupMenuFixture popupMenu = openFileListPopupMenu(index);
	popupMenu.menuItem(MainFramePopupMenu.NAME_MENU_ITEM_EDIT).click();
	return WindowFinder.findDialog(EditDialog.NAME).using(robot);
}
 

开发者ID:aguelle,
项目名称:MIDI-Automator,
代码行数:15,
代码来源:GUIAutomations.java

示例10: me

点赞 2

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
@Override
public FrameFixture me() {
  return WindowFinder.findFrame(new GenericTypeMatcher<JFrame>(JFrame.class) {
    protected boolean isMatching(JFrame frame1) {
      return frame1.getTitle().startsWith("OtrosLogViewer") && frame1.isShowing();
    }
  }).using(robot);
}
 

开发者ID:otros-systems,
项目名称:otroslogviewer,
代码行数:9,
代码来源:MainFrame.java

示例11: addFile

点赞 2

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
public OpenPanel addFile(File file) throws InterruptedException {
    me().button("OpenPanel.add more files").click();
    WindowFinder.findDialog(new GenericTypeMatcher<Dialog>(Dialog.class) {
      @Override
      protected boolean isMatching(@Nonnull Dialog component) {
        System.out.println("Searching for dialog " + component.getTitle() + " / " + component.getName());
        return false;
      }
    });
    final DialogFixture vfsBrowserDialog = WindowFinder.findDialog("VfsBrowserDialog").using(robot);

    openFile(file, vfsBrowserDialog);
//    Thread.sleep(1000);
    return this;
  }
 

开发者ID:otros-systems,
项目名称:otroslogviewer,
代码行数:16,
代码来源:OpenPanel.java

示例12: onSetUp

点赞 2

import org.assertj.swing.finder.WindowFinder; //导入依赖的package包/类
@Override
protected void onSetUp() {
    TestUtils.initJabRef();
    frameFixture = WindowFinder.findFrame(JFrame.class).withTimeout(15, TimeUnit.SECONDS).using(robot());
}
 

开发者ID:JabRef,
项目名称:jabref,
代码行数:6,
代码来源:SearchResultsTest.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)