Package com.gargoylesoftware.htmlunit.html

Examples of com.gargoylesoftware.htmlunit.html.HtmlPage.selectSingleNode()


     * Nested optional blocks
     */
    public void test1() throws Exception {
        HtmlPage p = createWebClient().goTo("self/test1");

        HtmlElement outer = (HtmlElement)p.selectSingleNode("//INPUT[@name='outer']");
        HtmlElement inner = (HtmlElement)p.selectSingleNode("//INPUT[@name='inner']");
        HtmlInput field = (HtmlInput)p.selectSingleNode("//INPUT[@type='text'][@name='_.field']");

        // outer gets unfolded, but inner should be still folded
        outer.click();
View Full Code Here


     */
    public void test1() throws Exception {
        HtmlPage p = createWebClient().goTo("self/test1");

        HtmlElement outer = (HtmlElement)p.selectSingleNode("//INPUT[@name='outer']");
        HtmlElement inner = (HtmlElement)p.selectSingleNode("//INPUT[@name='inner']");
        HtmlInput field = (HtmlInput)p.selectSingleNode("//INPUT[@type='text'][@name='_.field']");

        // outer gets unfolded, but inner should be still folded
        outer.click();
        assertFalse(field.isDisplayed());
View Full Code Here

    public void test1() throws Exception {
        HtmlPage p = createWebClient().goTo("self/test1");

        HtmlElement outer = (HtmlElement)p.selectSingleNode("//INPUT[@name='outer']");
        HtmlElement inner = (HtmlElement)p.selectSingleNode("//INPUT[@name='inner']");
        HtmlInput field = (HtmlInput)p.selectSingleNode("//INPUT[@type='text'][@name='_.field']");

        // outer gets unfolded, but inner should be still folded
        outer.click();
        assertFalse(field.isDisplayed());
        // now click inner, to reveal the field
View Full Code Here

     * optional block inside the dropdownDescriptorSelector
     */
    public void test2() throws Exception {
        HtmlPage p = createWebClient().goTo("self/test2");

        HtmlSelect s = (HtmlSelect)p.selectSingleNode("//SELECT");
        List<HtmlOption> opts = s.getOptions();

        // those first selections will load additional HTMLs
        s.setSelectedAttribute(opts.get(0),true);
        s.setSelectedAttribute(opts.get(1),true);
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.