Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlElement


         el1.type(IMAGE_TO_UPLOAD);
      }     
     
      final HtmlInput el2 = (HtmlInput) uploadPage.getFirstByXPath(FILE_UPLOAD_UPDATE);
      final HtmlPage finishPage = (HtmlPage) el2.click();
      final HtmlElement el3 = (HtmlElement) finishPage.getFirstByXPath(FILE_UPLOAD_RESPONSE);
     
      assertFalse("Page should contain \"Successfully updated\"", el3 == null);
   }
View Full Code Here


               
                HtmlPage page = (HtmlPage) client.getPage(
                        "http://localhost:8989/mvc/serv/jsp/basic/client" + clientNum);
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h1");
                checkEquals(1, elements.size());
                HtmlElement h1 = elements.get(0);
                checkEquals("client" + clientNum, h1.getTextContent());
               
            } catch (Exception e) {
                logger.error("error", e);
                error = true;
            }
View Full Code Here

        public void run() {
            try {
                HtmlPage page = (HtmlPage) client.getPage(baseURL + "/index/with-param?var=hello");
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h2");
                checkEquals(1, elements.size());
                HtmlElement h2 = elements.get(0);
                checkEquals("index/with-param hello", h2.getTextContent());
            } catch (Exception e) {
                logger.error("error", e);
                error = true;
            }
            logger.debug("Client5 request complete!");
View Full Code Here

        public void run() {
            try {
                HtmlPage page = (HtmlPage) client.getPage(baseURL + "/index/another-param?var=hello");
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h2");
                checkEquals(1, elements.size());
                HtmlElement h2 = elements.get(0);
                checkEquals("index/another-param hello", h2.getTextContent());
            } catch (Exception e) {
                logger.error("error", e);
                error = true;
            }
            logger.debug("Client6 request complete!");
View Full Code Here

        public void run() {
            try {
                HtmlPage page = (HtmlPage) client.getPage(baseURL + "/index/some-service?var=hello");
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h2");
                checkEquals(1, elements.size());
                HtmlElement h2 = elements.get(0);
                checkEquals("index/some-service answered hello", h2.getTextContent());
            } catch (Exception e) {
                logger.error("error", e);
                error = true;
            }
            logger.debug("Client7 request complete!");
View Full Code Here

            try {
                HtmlPage page = (HtmlPage) client.getPage(baseURL
                        + "/index/test-annotation?var=annotationTest");
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h2");
                checkEquals(1, elements.size());
                HtmlElement h2 = elements.get(0);
                checkEquals("index/test-annotation annotationTest", h2.getTextContent());
            } catch (Exception e) {
                logger.error("error", e);
                error = true;
            }
            logger.debug("Client8 request complete!");
View Full Code Here

            try {
                HtmlPage page = (HtmlPage) client.getPage(baseURL
                        + "/annot/some-action?var=contollerAnnotationTest");
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h2");
                checkEquals(1, elements.size());
                HtmlElement h2 = elements.get(0);
                checkEquals("annot/some-action contollerAnnotationTest", h2.getTextContent());
            } catch (Exception e) {
                logger.error("error", e);
                error = true;
            }
            logger.debug("Client9 request complete!");
View Full Code Here

            try {
                HtmlPage page = (HtmlPage) client.getPage(baseURL
                        + "/index/param-annotation-string?p1=param1");
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h2");
                checkEquals(1, elements.size());
                HtmlElement h2 = elements.get(0);
                checkEquals("index/param-annotation-string param1", h2.getTextContent());
            } catch (Exception e) {
                logger.error("error", e);
                error = true;
            }
            logger.debug("Client10 request complete!");
View Full Code Here

            try {
                HtmlPage page = (HtmlPage) client.getPage(baseURL
                        + "/index/param-annotation-string?p1=param2");
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h2");
                checkEquals(1, elements.size());
                HtmlElement h2 = elements.get(0);
                checkEquals("index/param-annotation-string param2", h2.getTextContent());
            } catch (Exception e) {
                logger.error("error", e);
                error = true;
            }
            logger.debug("Client11 request complete!");
View Full Code Here

            try {
                HtmlPage page = (HtmlPage) client.getPage(baseURL
                        + "/index/param-annotation-string?p1=param3");
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h2");
                checkEquals(1, elements.size());
                HtmlElement h2 = elements.get(0);
                checkEquals("index/param-annotation-string param3", h2.getTextContent());
            } catch (Exception e) {
                logger.error("error", e);
                error = true;
            }
            logger.debug("Client12 request complete!");
View Full Code Here

TOP

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

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.