Examples of FrameFixture


Examples of org.fest.swing.fixture.FrameFixture

   * @param finder
   * @param frameName
   * @return the found frame, or null if no matching frame can be found.
   */
  public static FrameFixture findFrameWithName(ComponentFinder finder, String frameName) {
    FrameFixture result = null;
    JFrame windowFrame = null;
    FrameFixture frameFixture = null;
   
    if (!threads.empty()) {
      waitForIdle();
    }
    for (int i = 0; i < 1000 && result == null; i++) {
      try {
        if (windowFrame == null) {
          windowFrame = (JFrame)finder.find(FrameMatcher.withName(frameName).andShowing());
        }
        if (frameFixture == null && windowFrame != null) {
          if (robot == null) {
            frameFixture = new FrameFixture(windowFrame);
            robot = frameFixture.robot;
          }
          else {
            frameFixture = new FrameFixture(robot, windowFrame);
          }
        }
        if (frameFixture == null || !frameFixture.target.isVisible()) {
          Task.delay(50);
          continue;
View Full Code Here

Examples of org.fest.swing.fixture.FrameFixture

   * @param finder
   * @param frameName
   * @return the found frame, or null if no matching frame can be found.
   */
  public static FrameFixture findFrameWithTitle(ComponentFinder finder, String frameName) {
    FrameFixture result = null;
    JFrame windowFrame = null;
    FrameFixture frameFixture = null;
   
    if (!threads.empty()) {
      waitForIdle();
    }
    for (int i = 0; i < 1000 && result == null; i++) {
      try {
        if (windowFrame == null) {
          windowFrame = (JFrame)finder.find(FrameMatcher.withTitle(frameName).andShowing());
        }
        if (frameFixture == null) {
          if (robot == null) {
            frameFixture = new FrameFixture(windowFrame);
            robot = frameFixture.robot;
          }
          else {
            frameFixture = new FrameFixture(robot, windowFrame);
          }
        }
        if (!frameFixture.target.isVisible()) {
          Task.delay(50);
          continue;
View Full Code Here

Examples of org.fest.swing.fixture.FrameFixture

   * @param parentWin The parent window fixture
   * @param string the name of the window to find.
   * @return
   */
  public static FrameFixture findChildWithName(FrameFixture parentWin, String string) {
    FrameFixture result = null;
 
    if (!threads.empty()) {
      waitForIdle();
    }
    for (int i = 0; i < 1000 && result == null; i++) {
          Frame windowFrame = parentWin.robot.finder().find(FrameMatcher.withName(string).andShowing());
          if (windowFrame != null) {
            result = new FrameFixture(parentWin.robot, windowFrame);
            break;
          }
          Task.delay(50);
    }
    return result;
View Full Code Here

Examples of org.fest.swing.fixture.FrameFixture

   * @param finder
   * @param frameName
   * @return the found frame, or null if no matching frame can be found.
   */
  public static FrameFixture findFrameWithName(ComponentFinder finder, String frameName) {
    FrameFixture result = null;
    JFrame windowFrame = null;
    FrameFixture frameFixture = null;
   
    if (!threads.empty()) {
      waitForIdle();
    }
    for (int i = 0; i < 1000 && result == null; i++) {
      try {
        if (windowFrame == null) {
          windowFrame = (JFrame)finder.find(FrameMatcher.withName(frameName).andShowing());
        }
        if (frameFixture == null && windowFrame != null) {
          if (robot == null) {
            frameFixture = new FrameFixture(windowFrame);
            robot = frameFixture.robot;
          }
          else {
            frameFixture = new FrameFixture(robot, windowFrame);
          }
        }
        if (frameFixture == null || !frameFixture.target.isVisible()) {
          Task.delay(50);
          continue;
View Full Code Here

Examples of org.fest.swing.fixture.FrameFixture

   * @param finder
   * @param frameName
   * @return the found frame, or null if no matching frame can be found.
   */
  public static FrameFixture findFrameWithTitle(ComponentFinder finder, String frameName) {
    FrameFixture result = null;
    JFrame windowFrame = null;
    FrameFixture frameFixture = null;
   
    if (!threads.empty()) {
      waitForIdle();
    }
    for (int i = 0; i < 1000 && result == null; i++) {
      try {
        if (windowFrame == null) {
          windowFrame = (JFrame)finder.find(FrameMatcher.withTitle(frameName).andShowing());
        }
        if (frameFixture == null) {
          if (robot == null) {
            frameFixture = new FrameFixture(windowFrame);
            robot = frameFixture.robot;
          }
          else {
            frameFixture = new FrameFixture(robot, windowFrame);
          }
        }
        if (!frameFixture.target.isVisible()) {
          Task.delay(50);
          continue;
View Full Code Here

Examples of org.fest.swing.fixture.FrameFixture

   * @param parentWin The parent window fixture
   * @param string the name of the window to find.
   * @return
   */
  public static FrameFixture findChildWithName(FrameFixture parentWin, String string) {
    FrameFixture result = null;
 
    if (!threads.empty()) {
      waitForIdle();
    }
    for (int i = 0; i < 1000 && result == null; i++) {
          Frame windowFrame = parentWin.robot.finder().find(FrameMatcher.withName(string).andShowing());
          if (windowFrame != null) {
            result = new FrameFixture(parentWin.robot, windowFrame);
            break;
          }
          Task.delay(50);
    }
    return result;
View Full Code Here

Examples of org.fest.swing.fixture.FrameFixture

   * @param robot contains the underlying finding to delegate the search to.
   * @return a <code>FrameFixture</code> managing the found <code>Frame</code>.
   * @throws org.fest.swing.exception.WaitTimedOutError if a <code>Frame</code> could not be found.
   */
  public FrameFixture using(Robot robot) {
    return new FrameFixture(robot, findComponentWith(robot));
  }
View Full Code Here

Examples of org.fest.swing.fixture.FrameFixture

import Framework.EventManager;
import Framework.Task;

public class DisplayProjectTestUtils {
  public static FrameFixture findFrameWithName(ComponentFinder finder, String frameName) {
    FrameFixture result = null;
    JFrame windowFrame = null;
    FrameFixture frameFixture = null;
   
    for (int i = 0; i < 1000 && result == null; i++) {
      try {
        if (windowFrame == null) {
          windowFrame = (JFrame)finder.find(FrameMatcher.withName(frameName));
        }
        if (frameFixture == null) {
          frameFixture = new FrameFixture(windowFrame);
        }
        if (!frameFixture.target.isVisible()) {
          Task.delay(50);
          continue;
        }
View Full Code Here

Examples of org.fest.swing.fixture.FrameFixture

     */
    public static FrameFixture getWindowAsChildOf(FrameFixture parentWin) {
        return DisplayProjectTestUtils.findChildWithName(parentWin, cWINDOW_NAME);
    }
    public static FrameFixture getWindowAsAsyncChildOf(FrameFixture parentWin) {
        FrameFixture frame = getWindow(parentWin.robot.finder());
        DisplayProjectTestUtils.pushThreadForAsyncWindow(frame);
        return frame;
    }
View Full Code Here

Examples of org.fest.swing.fixture.FrameFixture

     */
    public static FrameFixture getWindowAsChildOf(FrameFixture parentWin) {
        return DisplayProjectTestUtils.findChildWithName(parentWin, cWINDOW_NAME);
    }
    public static FrameFixture getWindowAsAsyncChildOf(FrameFixture parentWin) {
        FrameFixture frame = getWindow(parentWin.robot.finder());
        DisplayProjectTestUtils.pushThreadForAsyncWindow(frame);
        return frame;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.