Examples of HtmlButton


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

*/
@Test
public class HtmlButtonTest {

  public void button_teste() {
    HtmlButton ui = Html.button().end();

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

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

    assertThat(ui, hasToString(equalTo("<button></button>")));
  }

  public void button_text() {
    HtmlButton ui = Html.button()
        .text("Button")
        .end();

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

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

    assertThat(ui, hasToString(equalTo("<button>Button</button>")));
  }

  public void button_type() {
    HtmlButton ui = Html.button()
        .type("submit")
        .end();

    assertThat(ui, hasToString(equalTo("<button type=\"submit\"></button>")));
  }
View Full Code Here

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

    assertThat(ui, hasToString(equalTo("<button type=\"submit\"></button>")));
  }

  public void button_style() {
    HtmlButton ui = Html.button()
        .styleClass("btn")
        .end();

    assertThat(ui, hasToString(equalTo("<button class=\"btn\"></button>")));
  }
View Full Code Here

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

    assertThat(ui, hasToString(equalTo("<button class=\"btn\"></button>")));
  }

  public void button_data_way_multi_submit() {
    HtmlButton ui = Html.button()
        .multiSubmit("limite-list")
        .end();

    assertThat(ui, hasToString(equalTo("<button data-way-multi-submit=\"limite-list\"></button>")));
  }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlButton

            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
            String redirectQuery;
            try {
                final Page redirectPage = consentAccept.click();
                redirectQuery = redirectPage.getUrl().getQuery();
            } catch (FailingHttpStatusCodeException e) {
                // escalate non redirect errors
                if (e.getStatusCode() != HttpStatus.SC_MOVED_TEMPORARILY) {
                    throw e;
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlButton

     * Simulates the addition of the new Maven via UI and makes sure it works.
     */
    public void testGlobalConfigAjax() throws Exception {
        HtmlPage p = new WebClient().goTo("configure");
        HtmlForm f = p.getFormByName("config");
        HtmlButton b = getButtonByCaption(f, "Add Maven");
        b.click();
        findPreviousInputElement(b,"name").setValueAttribute("myMaven");
        findPreviousInputElement(b,"home").setValueAttribute("/tmp/foo");
        submit(f);
        verify();

View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlButton

        assertTrue("Charlie should have extended read for this test", gas.hasExplicitPermission("charlie",Item.EXTENDED_READ));

        WebClient wc = new WebClient().login("charlie","charlie");
        HtmlPage page = wc.goTo("job/a/configure");
        HtmlForm form = page.getFormByName("config");
        HtmlButton saveButton = getButtonByCaption(form,"Save");
        assertNull(saveButton);
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlButton

    while (candidateIterator.hasNext()) {
      final HtmlElement curElement = (HtmlElement) candidateIterator.next();
      if (!(curElement instanceof HtmlButton)) {
        continue;
      }
      final HtmlButton curButton = (HtmlButton) curElement;
      LOG.debug("Examining button: " + curButton);
      if (hasMatchingNameOrDontCare(curButton) && hasMatchingLabelOrDontCare(curButton)) {
        if (indexFound == ConversionUtil.convertToInt(getFieldIndex(), 0)) {
          LOG.debug("Normal button found: " + curButton);
          return curButton;
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.html.HtmlButton

      {
         // Find and Click save button
         e = client.getElement(customSaveId);
         assertNotNull("Control not found: "+customSaveId,e);
         assertTrue("Control not expected type (HtmlButton): "+e.getClass(),e instanceof HtmlButton);
         HtmlButton saveButton = (HtmlButton)e;
         saveButton.click();
      }
      else
      {
         // Check to see if buttons are visible
         e = client.getElement(controlId+"bar");
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.