Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlForm.submit()


            HtmlPage page = goTo("/login");

            HtmlForm form = page.getFormByName("login");
            form.getInputByName("j_username").setValueAttribute(username);
            form.getInputByName("j_password").setValueAttribute(password);
            form.submit(null);
            return this;
        }

        /**
         * Logs in to Hudson, by using the user name as the password.
View Full Code Here


        public HtmlPage search(String q) throws IOException, SAXException {
            HtmlPage top = goTo("");
            HtmlForm search = top.getFormByName("search");
            search.getInputByName("q").setValueAttribute(q);
            return (HtmlPage)search.submit(null);
        }

        /**
         * Short for {@code getPage(r,"")}, to access the top page of a build.
         */
 
View Full Code Here

//            page = (HtmlPage) page.getFirstAnchorByText("Login").click();

            HtmlForm form = page.getFormByName("login");
            form.getInputByName("j_username").setValueAttribute(username);
            form.getInputByName("j_password").setValueAttribute(password);
            form.submit(null);
            return this;
        }

        /**
         * Logs in to Hudson, by using the user name as the password.
View Full Code Here

        public HtmlPage search(String q) throws IOException, SAXException {
            HtmlPage top = goTo("");
            HtmlForm search = top.getFormByName("search");
            search.getInputByName("q").setValueAttribute(q);
            return (HtmlPage)search.submit(null);
        }

        /**
         * Short for {@code getPage(r,"")}, to access the top page of a build.
         */
 
View Full Code Here

                HtmlInput login = form.getInputByName("login");
                HtmlInput password = form.getInputByName("password");
                login.setValueAttribute("test");
                password.setValueAttribute("password");

                resultPage = (HtmlPage) form.submit();
                // Check response from servlet
                resultResponse = resultPage.getWebResponse();
                assertTrue(resultResponse.getStatusCode() <= 200);

             
View Full Code Here

        for(Iterator iter = forms.iterator();  formfound != true && iter.hasNext();) {
            HtmlForm form = (HtmlForm) iter.next();

            if ("purchaseStock.jsp".equals(form.getActionAttribute())) {
                formfound = true;
                resultPage = (HtmlPage) form.submit();
            }

        }
        assertTrue(formfound);
        forms = resultPage.getForms();
View Full Code Here

                HtmlInput login = form.getInputByName("symbol");
                HtmlInput password = form.getInputByName("quantity");
                login.setValueAttribute("EDS");
                password.setValueAttribute("131");
               
                resultPage = (HtmlPage) form.submit();
                // Check response from servlet
                resultResponse = resultPage.getWebResponse();
                assertTrue(resultResponse.getStatusCode() <= 200);

            
View Full Code Here

               
               
               
                formfound = true;
                resultPage = (HtmlPage) form.submit();
                // Check response from servlet
                resultResponse = resultPage.getWebResponse();
                assertTrue(resultResponse.getStatusCode() <= 200);

View Full Code Here

               
                HtmlInput password = form.getInputByName("quantity");
               
                password.setValueAttribute("131");

                resultPage = (HtmlPage) form.submit();
                // Check response from servlet
                resultResponse = resultPage.getWebResponse();
                assertTrue(resultResponse.getStatusCode() <= 200);

               
View Full Code Here

            if ("loginAction".equals(form.getActionAttribute())) {
                formfound = true;
               
                // FIXME this seems to performs a log-in again instead of logout...
                 resultPage = (HtmlPage) form.submit();

            }

        }
        assertTrue(formfound);
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.