Examples of HtmlForm


Examples of br.com.objectos.way.ui.builder.HtmlForm

*/
@Test
public class HtmlFormTest {

  public void form_simples() {
    HtmlForm ui = Html.form().end();

    assertThat(ui, hasToString(equalTo("<form></form>")));
  }
View Full Code Here

Examples of com.acciente.induction.controller.HTMLForm

   {
      Object   oSystemModel = null;

      if ( oSystemModelClass.isAssignableFrom( Form.class ) )
      {
         oSystemModel = new HTMLForm( oHttpServletRequest, _oFileUploadConfig );

      }
      else if ( oSystemModelClass.isAssignableFrom( URLResolver.class ) )
      {
         oSystemModel = new URLResolver( _oRedirectResolverExecutor, oHttpServletRequest );
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlForm

        }
       
        public RequestAssertion afterSubmittingForm(String formName,
                FormInputValue...formVals) throws Exception {
           
            HtmlForm form = ((HtmlPage)page).getFormByName(formName);
            for (FormInputValue formVal : formVals) {
                HtmlInput input = form.getInputByName(formVal.getInputName());
                formVal.handleInput(input);
            }
            HtmlSubmitInput submit = form.getInputByValue("submit");
            page = submit.click();
            return this;
        }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlForm

         * Logs in to Jenkins.
         */
        public WebClient login(String username, String password) throws Exception {
            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;
        }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlForm

            return r.get(0);
        }

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

Examples of com.gargoylesoftware.htmlunit.html.HtmlForm

            OAuthWebViewData viewData = new OAuthWebViewData(boxClient.getOAuthDataController());
            viewData.setOptionalState(String.valueOf(csrfId));
            final HtmlPage authPage = webClient.getPage(viewData.buildUrl().toString());

            // submit login credentials
            final HtmlForm loginForm = authPage.getFormByName("login_form");
            final HtmlTextInput login = loginForm.getInputByName("login");
            login.setText(configuration.getUserName());
            final HtmlPasswordInput password = loginForm.getInputByName("password");
            password.setText(configuration.getUserPassword());
            final HtmlSubmitInput submitInput = loginForm.getInputByName("login_submit");

            // submit consent
            final HtmlPage consentPage = submitInput.click();
            final HtmlForm consentForm = consentPage.getFormByName("consent_form");
            final HtmlButton consentAccept = consentForm.getButtonByName("consent_accept");

            // disable redirect to avoid loading redirect URL
            webClient.getOptions().setRedirectEnabled(false);

            // validate CSRF and get authorization code
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlForm

                    builder.toString(), encodedRedirectUri);
            }
            final HtmlPage authPage = webClient.getPage(url);

            // submit login credentials
            final HtmlForm loginForm = authPage.getFormByName("oauth2SAuthorizeForm");
            final HtmlTextInput login = loginForm.getInputByName("session_key");
            login.setText(oAuthParams.getUserName());
            final HtmlPasswordInput password = loginForm.getInputByName("session_password");
            password.setText(oAuthParams.getUserPassword());
            final HtmlSubmitInput submitInput = loginForm.getInputByName("authorize");

            // disable redirect to avoid loading redirect URL
            webClient.getOptions().setRedirectEnabled(false);

            // validate CSRF and get authorization code
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlForm

         */
        public WebClient login(String username, String password) throws Exception {
            HtmlPage page = goTo("/login");
//            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;
        }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlForm

            return r.get(0);
        }

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

Examples of com.gargoylesoftware.htmlunit.html.HtmlForm

        input.fireEvent("blur");
        return page;
    }

    protected HtmlInput getInput(HtmlPage page) {
        HtmlForm htmlForm = page.getFormByName("form");
        assertNotNull(htmlForm);
        HtmlInput input = htmlForm.getInputByName("form:text");
        return input;
    }
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.