Examples of closeAllWindows()


Examples of com.gargoylesoftware.htmlunit.WebClient.closeAllWindows()

        HtmlCheckBoxInput catalogItems = (HtmlCheckBoxInput) form.getInputByName("items");

        System.out.println(">>>" + catalogItems.getAttribute("value"));
        Assert.assertEquals("Apple - $2.99", catalogItems.getAttribute("value"));

        webClient.closeAllWindows();
    }

}
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.closeAllWindows()

    stringBuilder.append("<center><h3>You are viewing a non-interactive page that is intended for the crawler.  ");
    stringBuilder.append("You probably want to see this page: <a href=\"" + url + "\">" + url + "</a></h3></center>\n");
    stringBuilder.append("<hr />\n");

    stringBuilder.append(page.asXml());
    webClient.closeAllWindows();
    return stringBuilder;
  }

  /**
   * Checks if there is a page from {@code deprecatedPages} that is not expired. If there is
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.closeAllWindows()

            i++;
        }
        reset(page);
        Assert.assertTrue("Win page expected after playing smart.", isOnWinPage(page));

        client.closeAllWindows();
    }

    protected void reset(HtmlPage page) throws IOException {
        ((HtmlSubmitInput) page.getElementById(GUESS_RESET)).click();
    }
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.closeAllWindows()

            (HtmlAnchor) page.getByXPath( "//a[@href = \"javascript:toggleDisplay('surefire260.TestB.testDup');\"]" ).get( 0 );
        final HtmlDivision content = (HtmlDivision) page.getElementById( "surefire260.TestB.testDuperror" );
        assertTrue( content.getAttribute( "style" ).contains( "none" ) );
        a.click();
        assertFalse( content.getAttribute( "style" ).contains( "none" ) );
        webClient.closeAllWindows();
    }
}
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.closeAllWindows()

        assertMoviesPresent(page);

        page = webClient.getPage(deploymentUrl + "/moviefun");

        assertMoviesPresent(page);
        webClient.closeAllWindows();
    }

    private void assertMoviesPresent(HtmlPage page) {
        String pageAsText = page.asText();
        assertTrue(pageAsText.contains("Wedding Crashers"));
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.closeAllWindows()

        assertMoviesPresent(page);

        page = webClient.getPage("http://localhost:" + port + "/moviefun/moviefun");

        assertMoviesPresent(page);
        webClient.closeAllWindows();
    }

    private void assertMoviesPresent(HtmlPage page) {
        String pageAsText = page.asText();
        assertTrue(pageAsText.contains("Wedding Crashers"));
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.closeAllWindows()

        assertMoviesPresent(page);

        page = webClient.getPage("http://localhost:9999/moviefun/faces/movie/List.xhtml");

        assertMoviesPresent(page);
        webClient.closeAllWindows();
    }

    private void assertMoviesPresent(HtmlPage page) {
        String pageAsText = page.asText();
        assertTrue(pageAsText.contains("Wedding Crashers"));
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.closeAllWindows()

                    log.log(Level.SEVERE, "HtmlUnit ERROR on page.wait at loop counter " + loopCount, e);
                }
            }
        }

        webClient.closeAllWindows();

        return page.asXml();
    }

    /**
 
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.closeAllWindows()

        HtmlCheckBoxInput catalogItems = (HtmlCheckBoxInput) form.getInputByName("items");

        System.out.println(">>>" + catalogItems.getAttribute("value"));
        Assert.assertEquals("Apple - $2.99", catalogItems.getAttribute("value"));

        webClient.closeAllWindows();
    }

}
View Full Code Here

Examples of com.gargoylesoftware.htmlunit.WebClient.closeAllWindows()

      out.println("<hr>");

      webClient.waitForBackgroundJavaScriptStartingBefore(10000);

      out.println(page.asXml());
      webClient.closeAllWindows();
      out.close();

    } else {
     
        chain.doFilter(request, response);
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.