Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlPage


            super(baseURL);
        }

        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);
View Full Code Here


            super(baseURL);
        }

        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);
View Full Code Here

            super(baseURL);
        }

        public void run() {
            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);
View Full Code Here

            super(baseURL);
        }

        public void run() {
            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);
View Full Code Here

            super(baseURL);
        }

        public void run() {
            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);
View Full Code Here

            super(baseURL);
        }

        public void run() {
            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);
View Full Code Here

            super(baseURL);
        }

        public void run() {
            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);
View Full Code Here

            super(baseURL);
        }

        public void run() {
            try {
                HtmlPage page = (HtmlPage) client
                        .getPage(baseURL + "/some-stateful/set-var?var=statetest1");
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h1");
                checkEquals(1, elements.size());
                HtmlElement h1 = elements.get(0);
                checkEquals("some-stateful/set-var",
                        h1.getTextContent());

                /* make a second request */
                page = client.getPage(baseURL + "/some-stateful/get-var");
                elements = page.getElementsByTagName("h2");
                checkEquals(1, elements.size());
                HtmlElement h2 = elements.get(0);
                checkEquals("statetest1", h2.getTextContent());
            } catch (Exception e) {
                logger.error("error", e);
View Full Code Here

            super(baseURL);
        }

        public void run() {
            try {
                HtmlPage page = (HtmlPage) client
                        .getPage(baseURL + "/some-stateful/set-var?var=statetest2");
                DomNodeList<HtmlElement> elements = page.getElementsByTagName("h1");
                checkEquals(1, elements.size());
                HtmlElement h1 = elements.get(0);
                checkEquals("some-stateful/set-var",
                        h1.getTextContent());

                /* make a second request */
                page = client.getPage(baseURL + "/some-stateful/get-var");
                elements = page.getElementsByTagName("h2");
                checkEquals(1, elements.size());
                HtmlElement h2 = elements.get(0);
                checkEquals("statetest2", h2.getTextContent());
            } catch (Exception e) {
                logger.error("error", e);
View Full Code Here

            this.param = param;
        }

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

TOP

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

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.