Package org.jsoup.nodes

Examples of org.jsoup.nodes.Element.val()


    Document doc = Jsoup.parse(pBankResponse.body());
    Element element = doc.select("#viewPeriod option[selected]").first();

    Element previous = element.previousElementSibling();
    if (previous != null) {
      pagination.setPrev(Integer.parseInt(previous.val()));
    }

    Element next = element.nextElementSibling();
    if (next != null && isDateWithinRange(next)) {
      pagination.setNext(Integer.parseInt(next.val()));
View Full Code Here


      pagination.setPrev(Integer.parseInt(previous.val()));
    }

    Element next = element.nextElementSibling();
    if (next != null && isDateWithinRange(next)) {
      pagination.setNext(Integer.parseInt(next.val()));
    } else {
      pagination.setNext(-1);
    }
    pagination.setFirst(0);
    pagination.setLast(Integer.parseInt(element.lastElementSibling().val()));
View Full Code Here

    public void searchBoxContainsUserQuery() throws Exception {
        Document html = performSearch("someterm");

        Element searchInputBox = html.select("form input[name=q]").first();
        assertThat(searchInputBox, is(notNullValue()));
        assertThat(searchInputBox.val(), is("someterm"));
    }

    @Test
    public void displaysPaginationControl() throws Exception {
        buildManySearchEntries(15);
View Full Code Here

    }

    public String csrfValue() {
        Element csrfElement = html.select("#csrf").first();
        if (csrfElement != null) {
            return csrfElement.val();
        } else {
            return "";
        }
    }
}
View Full Code Here

    }

    public void hasRegistrationFields(String name, String email) {
        Element nameInputElement = html.select("#name").first();
        assertNotNull(nameInputElement);
        assertEquals(name, nameInputElement.val());

        Element emailInputElement = html.select("#email").first();
        assertNotNull(emailInputElement);
        assertEquals(email, emailInputElement.val());
    }
View Full Code Here

        assertNotNull(nameInputElement);
        assertEquals(name, nameInputElement.val());

        Element emailInputElement = html.select("#email").first();
        assertNotNull(emailInputElement);
        assertEquals(email, emailInputElement.val());
    }
}
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.