Examples of HtmlInput


Examples of com.gargoylesoftware.htmlunit.html.HtmlInput

    protected HtmlInput getNthInputContainingGivenId(HtmlPage root,
                 String id,
                 int whichInput) {
  List list;
  int i, hitCount = 0;
  HtmlInput result = null;
 
  list = getAllElementsOfGivenClass(root, null, HtmlInput.class);
  for (i = 0; i < list.size(); i++) {
      result = (HtmlInput) list.get(i);
      if (-1 != result.getIdAttribute().indexOf(id) &&
    hitCount++ == whichInput) {
    break;
      }
      result = null;
  }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlInput

    protected HtmlInput getNthFromLastInputContainingGivenId(HtmlPage root,
                   String id,
                   int whichInput) {
  List list;
  int i, hitCount = 0;
  HtmlInput result = null;
 
  list = getAllElementsOfGivenClass(root, null, HtmlInput.class);
  for (i = list.size() - 1; i >= 0; i--) {
      result = (HtmlInput) list.get(i);
      if (-1 != result.getIdAttribute().indexOf(id) &&
    hitCount++ == whichInput) {
    break;
      }
      result = null;
  }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlInput

        assertNotNull(htmlSlider);

        assertTrue(htmlSlider.getAttributeValue("class").contains(
                "rich-inslider rich-slider"));

        HtmlInput htmlSliderInput = (HtmlInput) renderedView.getHtmlElementById(
                slider.getClientId(facesContext) + "Input");

        assertNotNull(htmlSliderInput);

        String a = htmlSliderInput.getClassAttribute();
        assertTrue(htmlSliderInput.getClassAttribute().contains(
                "rich-inslider-field-right rich-inslider-field"));
        assertTrue(htmlSliderInput.getTypeAttribute().equals("text"));

        DomNode numContainer = htmlSliderInput.getParentNode()
                .getPreviousSibling();
        assertTrue(((HtmlElement) numContainer).getAttributeValue(
                "class").contains(
                "rich-inslider-right-num"));
        assertTrue(((HtmlElement) (numContainer.getPreviousSibling()))
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlInput

    }

    public void testHiddenInput() throws Exception {
        slider.getAttributes().put("showInput", Boolean.FALSE);
        HtmlPage renderedView = renderView();
        HtmlInput htmlSliderInput = (HtmlInput) renderedView.getHtmlElementById(
                slider.getClientId(facesContext) + "Input");
        assertTrue(htmlSliderInput.getTypeAttribute().equals("hidden"));
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlInput

        //tests if component handles value bindings correctly
        HtmlPage renderedView = renderView();

        String value = "66";

        HtmlInput htmlSliderInput = (HtmlInput) renderedView.getHtmlElementById(
                slider.getClientId(facesContext) + "Input");
        htmlSliderInput.setValueAttribute(value);

        HtmlAnchor htmlLink = (HtmlAnchor) renderedView.getHtmlElementById(
                command.getClientId(facesContext));
        htmlLink.click();
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlInput

    assertNotNull(htmlSlider);

    assertTrue(htmlSlider.getAttributeValue("class").contains(
        "rich-inslider-vertical rich-slider "));

    HtmlInput htmlSliderInput = (HtmlInput) renderedView
        .getHtmlElementById(slider.getClientId(facesContext) + "Input");

    assertNotNull(htmlSliderInput);

    assertTrue(htmlSliderInput.getClassAttribute().contains(
        "rich-inslider-field-top rich-inslider-field "));
    assertTrue(htmlSliderInput.getTypeAttribute().equals("text"));

    HtmlDivision track = (HtmlDivision) ((HtmlElement) renderedView
        .getHtmlElementById(slider.getClientId(facesContext) + "Track"))
        .getFirstDomChild();
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlInput

    assertNotNull(page);

    HtmlElement htmlSpan = page.getHtmlElementById(calendar.getClientId(facesContext)+"Popup");
    assertNotNull(htmlSpan);

    HtmlInput htmlCalendarInput = (HtmlInput) page
        .getHtmlElementById(calendar.getClientId(facesContext)
            + "InputDate");
    HtmlButton htmlCalendarButton = (HtmlButton) page
        .getHtmlElementById(calendar.getClientId(facesContext)
            + "PopupButton");
    HtmlSpan htmlCalendarSpan = (HtmlSpan) page.getHtmlElementById(calendar
        .getClientId(facesContext)
        + "Popup");
    assertNotNull(htmlCalendarInput);
    assertNotNull(htmlCalendarButton);
    assertNotNull(htmlCalendarSpan);

    assertEquals("11/09/2001", htmlCalendarInput.getValueAttribute());

    HtmlElement htmlCalendar1Span = page.getHtmlElementById(calendar1
        .getClientId(facesContext)+"Popup");
    assertNotNull(htmlCalendar1Span);
    assertEquals("display: none", htmlCalendar1Span.getAttributeValue(HTML.style_ATTRIBUTE));
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlInput

  //tests if component handles value bindings correctly
      HtmlPage renderedView = renderView();

      String value = "5";

  HtmlInput htmlSliderInput = (HtmlInput) renderedView.getHtmlElementById(dfSlider.getClientId(facesContext)+"slider_val");
  htmlSliderInput.setValueAttribute(value);

      HtmlAnchor htmlLink = (HtmlAnchor) renderedView.getHtmlElementById(command.getClientId(facesContext));
      htmlLink.click();

      List lastParameters = this.webConnection.getLastParameters();
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlInput

                .getHtmlElementById(spinner.getClientId(facesContext) + "Edit");
        assertNotNull(htmlSpinnerEdit);
        assertTrue(htmlSpinnerEdit.getAttributeValue("class").contains(
                "rich-spinner-input-container"));

        HtmlInput htmlSpinnerInput = (HtmlInput) htmlSpinnerEdit.getLastChild();
        assertNotNull(htmlSpinnerInput);
        assertTrue(htmlSpinnerInput.getAttributeValue("class").contains(
                "rich-spinner-input"));

        HtmlElement buttonsContainer = (HtmlElement) renderedView
                .getHtmlElementById(spinner.getClientId(facesContext)
                                    + "Buttons");
        assertNotNull(buttonsContainer);
        Collection inputs = buttonsContainer.getHtmlElementsByTagName("input");
        for (Iterator iter = inputs.iterator(); iter.hasNext();) {
            HtmlInput child = (HtmlInput) iter.next();
            assertTrue(child.getTypeAttribute().equals("image"));
            assertTrue(child.getAttributeValue("class").contains(
                    "rich-spinner-btn rich-spinner-button"));
        }
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlInput

                .getHtmlElementById(spinner.getClientId(facesContext)
                                    + "Buttons");
        assertNotNull(buttonsContainer);
        Collection inputs = buttonsContainer.getHtmlElementsByTagName("input");
        for (Iterator iter = inputs.iterator(); iter.hasNext();) {
            HtmlInput child = (HtmlInput) iter.next();
            assertTrue(child.getAttributeValue("onmouseup").equals(""));
        }
    }
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.