Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.DomNode


        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()))
                .getAttributeValue("class").contains(
                "rich-inslider-left-num"));

        HtmlElement tip = renderedView.getHtmlElementById(slider.getClientId(
                facesContext) + "Tip");
View Full Code Here


        .getFirstDomChild();

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

    DomNode numContainer = track.getParentDomNode().getParentDomNode()
        .getNextDomSibling().getFirstDomChild();
    assertTrue(((HtmlElement) numContainer).getAttributeValue("class")
        .contains("rich-inslider-bottom-num "));
    assertTrue(((HtmlElement) track.getParentDomNode().getNextDomSibling())
        .getAttributeValue("class").contains("rich-inslider-top-num "));
View Full Code Here

     
      HtmlScript item =  it.next();
      String srcAttr = item.getSrcAttribute();
     
      if (item.getFirstDomChild() != null) {
        DomNode script = item.getFirstDomChild();
        assertTrue(script.getNodeValue().contains("Richfaces.InplaceInput"));
      }
 
      if (StringUtils.isNotBlank(srcAttr)) {
        boolean found = false;
        for (Iterator <String> srcIt = javaScripts.iterator(); srcIt.hasNext();) {
View Full Code Here

      Iterator<HtmlElement> htmlElements = list.getAllHtmlChildElements();
      String allItems = suggestions + "Oregon, Pennsylvania, Rhode Island, South Carolina"
      for (; htmlElements.hasNext();) {
        HtmlElement span =  htmlElements.next();
        assertEquals("span", span.getTagName());
        DomNode node = span.getFirstDomChild();
        assertEquals(Node.TEXT_NODE, node.getNodeType());
        assertTrue(allItems.contains(node.getNodeValue()));
      }
    }
View Full Code Here

    HtmlPage page = executePageTest("failCajaTest", null);
    NodeList bodyList = page.getElementsByTagName("body");

    // Result should contain just one body
    assertEquals(1, bodyList.getLength());
    DomNode body = (DomNode) bodyList.item(0);

    // Failed output contains only an error block
    assertEquals(1, body.getChildNodes().getLength());
    assertEquals("ul", body.getFirstChild().getNodeName());
  }
View Full Code Here

    * @throws ClassCastException if the current page is not an HtmlPage.
    */
   public void setInputNumberSpinner(String componentID, String value)
         throws IOException
   {
      DomNode tdTag = (DomNode)jsfClient.getElement(componentID + "Edit");
      HtmlInput input = (HtmlInput)tdTag.getChildNodes().item(0);
      input.setValueAttribute(value);
   }
View Full Code Here

   }
  
   private void clickSpinnerButton(String componentID, String imageName)
          throws IOException
   {
      DomNode table = (DomNode)jsfClient.getElement(componentID + "Buttons");
      List inputs = table.getByXPath("tbody/tr/td/input");
      for (Iterator i = inputs.iterator(); i.hasNext();)
      {
         HtmlInput input = (HtmlInput)i.next();
         if (input.asXml().contains(imageName))
         {
View Full Code Here

    HtmlPage page = executePageTest("failCajaTest", null);
    NodeList bodyList = page.getElementsByTagName("body");

    // Result should contain just one body
    assertEquals(1, bodyList.getLength());
    DomNode body = (DomNode) bodyList.item(0);

    // Failed output contains only an error block
    assertEquals(1, body.getChildNodes().getLength());
    assertEquals("ul", body.getFirstChild().getNodeName());
  }
View Full Code Here

        if (documentType != null && page instanceof XmlPage) {
            final DomDocumentType domDoctype = new DomDocumentType(
                    page, documentType.getName(), documentType.getPublicId(), documentType.getSystemId());
            ((XmlPage) page).setDocumentType(domDoctype);
        }
        final DomNode childXml = createFrom(page, child);
        parent.appendChild(childXml);
        copy(page, child, childXml);
    }
View Full Code Here

        final NodeList nodeChildren = source.getChildNodes();
        for (int i = 0; i < nodeChildren.getLength(); i++) {
            final Node child = nodeChildren.item(i);
            switch (child.getNodeType()) {
                case Node.ELEMENT_NODE:
                    final DomNode childXml = createFrom(page, child);
                    dest.appendChild(childXml);
                    copy(page, child, childXml);
                    break;

                case Node.TEXT_NODE:
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.html.DomNode

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.