Package org.uispec4j.interception.handlers

Examples of org.uispec4j.interception.handlers.InterceptionHandler


    // Constructor is private since this is a singleton class
  }

  private void processWindow(Window window) {
    try {
      InterceptionHandler handler;
      synchronized (handlerStack) {
        if (!assertAcceptsWindow(window)) {
          return;
        }
        handler = (InterceptionHandler)handlerStack.pop();
      }
      handler.process(window);
    }
    catch (Throwable e) {
      ComponentUtils.close(window);
      store(e);
    }
View Full Code Here


  /**
   * Checks that there is a text component in the dialog displaying the given text.
   */
  public BasicHandler assertContainsText(final String text) {
    handlers.add(new InterceptionHandler() {
      public void process(Window window) {
        UIComponent component = window.findUIComponent(TextBox.class, text);
        if (component == null) {
          AssertAdapter.fail("Text not found: " + text);
        }
View Full Code Here

  /**
   * Checks the displayed title is the same as the given text.
   */
  public BasicHandler assertTitleEquals(final String expectedTitle) {
    handlers.add(new InterceptionHandler() {
      public void process(Window window) {
        window.titleEquals(expectedTitle).check();
      }
    });
    return this;
View Full Code Here

  /**
   * Checks the displayed title contains the given text.
   */
  public BasicHandler assertTitleContains(final String expectedTitle) {
    handlers.add(new InterceptionHandler() {
      public void process(Window window) {
        window.titleContains(expectedTitle).check();
      }
    });
    return this;
View Full Code Here

  /**
   * Clicks on a button given its displayed label. This method will throw an exception if
   * no button with this text is found.
   */
  public BasicHandler clickButton(final String buttonName) {
    handlers.add(new InterceptionHandler() {
      public void process(Window window) {
        window.getButton(buttonName).click();
      }
    });
    return this;
View Full Code Here

  /**
   * Enters a text value, provided that there is only one input text field in the dialog.
   */
  public BasicHandler setText(final String text) {
    handlers.add(new InterceptionHandler() {
      public void process(Window window) {
        window.getInputTextBox().setText(text);
      }
    });
    return this;
View Full Code Here

TOP

Related Classes of org.uispec4j.interception.handlers.InterceptionHandler

Copyright © 2018 www.massapicom. 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.