Package net.sourceforge.jwebunit.api

Examples of net.sourceforge.jwebunit.api.IElement


   */
  public void testSettingMapAddress() throws Exception {
   
    beginAtSitemapThenPage("Home");
   
    IElement map = assertHasMap("containing map");
   
    {
      String target = getLabelIDForText("address");
      assertLabeledFieldEquals(target, "");
      setLabeledFormElementField(target, "Wellington, New Zealand");
View Full Code Here


   */
  public void testSettingMapAddressSubmit() throws Exception {
   
    beginAtSitemapThenPage("Home");
   
    IElement map = assertHasMap("containing map");
   
    {
      String target = getLabelIDForText("address");
      assertLabeledFieldEquals(target, "");
      setLabeledFormElementField(target, "Wellington, New Zealand");
    }
   
    // click button
    assertButtonPresentWithText("update address");
    clickButtonWithText("update address");
    assertNoProblem();

    // if using google maps, we can't go any further
    if (!doCheckPoints()) return;

    // we now have a map point
    IElement point = assertHasMapPoint(map, "target point");
   
    // TODO how could we check that a given point is actually
    // a valid address?
    assertNotNull(point);
   
View Full Code Here

   */
  public void testSetThenUndo() throws Exception {
   
    beginAtSitemapThenPage("Home");
   
    IElement map = assertHasMap("containing map");
   
    {
      String target = getLabelIDForText("address");
      assertLabeledFieldEquals(target, "");
      setLabeledFormElementField(target, "Wellington, New Zealand");
View Full Code Here

   
    assertNoProblem();
   
    // the map point has been created
    if (!doCheckPoints()) return;
    IElement point = assertHasMapPoint("target map point");
   
    // TODO how to check that this point is at the right address?
    assertNotNull(point);
  }
View Full Code Here

   
    assertNoProblem();
   
    // the map point has been created
    if (!doCheckPoints()) return;
    IElement point = assertHasMapPoint("target map point");
   
    {
      String target = getLabelIDForText("select address");
      assertLabeledFieldEquals(target, "Wellington, New Zealand");
      setLabeledFormElementField(target, "Auckland, New Zealand");
    }
   
    assertNoProblem();
    IElement point2 = assertHasMapPoint("target map point");
   
    // TODO do they refer to the same element?
    assertEquals(point, point2);
     
  }
View Full Code Here

   * @throws Exception
   */
  public void testHasMap() throws Exception {
    beginAtSitemapThenPage("Home");
   
    IElement map = assertHasMap("Target Map");
   
    // but no map points are generated yet
    assertHasNoMapPoint("Target Map");
    assertHasNoMapPoint(map, "Target Map");
  }
View Full Code Here

    }
   
    assertNoProblem();
   
    // the map point now exists
    IElement map = assertHasMap("Target Map");
    IElement point1 = assertHasMapPoint("Target Map");
    IElement point2 = assertHasMapPoint(map, "Target Map");
    assertEquals(point1, point2);
  }
View Full Code Here

    }
   
    assertNoProblem();
   
    // the map point now exists
    IElement map = assertHasMap("Target Map");
    IElement point1 = assertHasMapPoint("Target Map");
    IElement point2 = assertHasMapPoint(map, "Target Map");
    assertEquals(point1, point2);
  }
View Full Code Here

   * @param b the value to check against
   */
  public void assertLabeledFieldEqualsDouble(String id,
      double b) {
   
      IElement label = getLabel(id);
      assertNotNull("no label for id [" + id + "] found", label);
     
      String value = getLabeledFieldValue(id, label);
      assertNotNull("Label '" + id + "' had no value", value);
     
View Full Code Here

   */
  public void testMapPoint() throws Exception {
    beginAtSitemapThenPage("Frame");
    assertNoProblem();

    IElement map = assertHasMap("Map");
    assertHasMapPoint(map, "Map Point");

    // TODO no way to check the location of the map point?
  }
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.