Package net.sourceforge.jwebunit.api

Examples of net.sourceforge.jwebunit.api.IElement


   *
   * @see InputForm
   * @param string the form title to search for
   */
  private void assertHasInputForm(String string) {
    IElement found = null;
    StringBuffer foundStrings = new StringBuffer();

    List<IElement> h2s = getElementsByXPath("//form/h2");
    for (IElement h2 : h2s) {
      foundStrings.append(h2.getTextContent()).append(", ");
View Full Code Here


    hasInputFormForText("Form visible");
   
    // another field is not
    List<IElement> list = hasInputFormForText("Form hidden");
    assertEquals(1, list.size());
    IElement form = list.get(0);
    assertFalse("Form is hidden", isDisplayed(form));
   
  }
View Full Code Here

    beginAtSitemapThenPage("Home");
    assertNoProblem();
   
    // one field is visible
    {
      IElement text = getFieldForLabel("Text visible");
      assertTrue("Text is hidden", isDisplayed(text));
    }

    // another field is not
    {
      IElement text = getFieldForLabel("Text hidden");
      assertFalse("Text is displayed", isDisplayed(text));
    }
  }
View Full Code Here

    beginAtSitemapThenPage("Home");
    assertNoProblem();
   
    // one field is visible
    {
      IElement button = getButtonWithText("Button visible");
      assertTrue("Button is hidden", isDisplayed(button));
    }
   
    // another field is not
    {
      IElement button = getButtonWithText("Button hidden");
      assertFalse("Button is displayed", isDisplayed(button));
    }
  }
View Full Code Here

    beginAtSitemapThenPage("Home");
    assertNoProblem();

    // opposite check of #testMapVisibility() above
    {
      IElement map = assertHasMap("Map value visible");
      // as of r2816, this check is also performed by assertHasMap
      assertTrue("Map is hidden", isDisplayed(map));
    }
   
    {
View Full Code Here

    assertLabelTextNotPresent("One");
    assertLabelTextNotPresent("Two");
    assertLabelTextNotPresent("Three");
    assertLabelTextNotPresent("Four");
    assertLabelTextExactlyPresent("Five");
    IElement label = assertLabelTextExactlyPresent("Six");
    assertLabelTextNotPresent("Seven");
    assertLabelTextExactlyPresent("Eight");
    assertLabelTextNotPresent("Nine");
    assertLabelTextNotPresent("Ten");
   
View Full Code Here

      assertLabeledFieldEquals(target, "");
    }
   
    // click 'Title 2'
    {
      IElement label = assertLabelTextExactlyPresent("Title 2");
      clickElement(label);
    }
    assertNoProblem();
   
    // the text field has been refreshed
    {
      String target = getLabelIDForText("clicked title");
      assertLabeledFieldEquals(target, "Title 2");
    }
   
    // click 'Title 3'
    {
      IElement label = assertLabelTextExactlyPresent("Title 3");
      clickElement(label);
    }
    assertNoProblem();
   
    // the text field has been refreshed
    {
      String target = getLabelIDForText("clicked title");
      assertLabeledFieldEquals(target, "Title 3");
    }
   
    // click 'Title 1'
    {
      IElement label = assertLabelTextExactlyPresent("Title 1");
      clickElement(label);
    }
    assertNoProblem();
   
    // the text field has been refreshed
    {
      String target = getLabelIDForText("clicked title");
      assertLabeledFieldEquals(target, "Title 1");
    }
   
    // click 'Title 1'
    {
      IElement label = assertLabelTextExactlyPresent("Title 1");
      clickElement(label);
    }
    assertNoProblem();
   
    // the text field has been refreshed
View Full Code Here

TOP

Related Classes of net.sourceforge.jwebunit.api.IElement

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.