Package com.gargoylesoftware.htmlunit

Examples of com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController


    @Before
    public void setUp() throws Exception
    {
        webClient = new WebClient(getBrowserVersion());
        webClient.setAjaxController(new NicelyResynchronizingAjaxController());
    }
View Full Code Here


        WebClient webClient = new WebClient(BrowserVersion.FIREFOX_3);
        webClient.setRedirectEnabled(true);
        webClient.setThrowExceptionOnScriptError(false);
        //webClient.waitForBackgroundJavaScript(100000);
        //webClient.waitForBackgroundJavaScriptStartingBefore(100000);
        webClient.setAjaxController(new NicelyResynchronizingAjaxController());

        HtmlPage page = (HtmlPage) webClient.getPage("http://localhost:8080/store/store.html");

        HtmlForm form = (HtmlForm) page.getFormByName("catalogForm");
View Full Code Here

    protected static WebClient newClient() {
        final WebClient webClient = new WebClient();
        webClient.getOptions().setJavaScriptEnabled(false);
        webClient.getOptions().setCssEnabled(false);
        webClient.getOptions().setAppletEnabled(false);
        webClient.setAjaxController(new NicelyResynchronizingAjaxController());
        return webClient;
    }
View Full Code Here

    @Override
    //@Before
    public void before()
    {
        webClient = new WebClient(getBrowserVersion());
        webClient.setAjaxController(new NicelyResynchronizingAjaxController());
    }
View Full Code Here

    public void before()
    {
        super.before();

        webClient = new WebClient(getBrowserVersion());
        webClient.setAjaxController(new NicelyResynchronizingAjaxController());
    }
View Full Code Here

    protected <P extends Page> P page(final String path) throws IOException {
        final WebClient webClient = new WebClient();
        webClient.getOptions().setJavaScriptEnabled(false);
        webClient.getOptions().setCssEnabled(false);
        webClient.getOptions().setAppletEnabled(false);
        webClient.setAjaxController(new NicelyResynchronizingAjaxController());
        return webClient.getPage(base.toExternalForm() + "sirona/" + path);
    }
View Full Code Here

    public static WebClient startWebClient(boolean ajaxSync) {
        WebClient wc = new WebClient(BrowserVersion.FIREFOX_3);
        wc.setCssEnabled(false);
        if (ajaxSync) {
            wc.addRequestHeader("ajaxSync", "true");
            wc.setAjaxController(new NicelyResynchronizingAjaxController());
        }
        return wc;
    }
View Full Code Here

   */
  public void run() throws IOException {
    try {
      startTime = new Date().getTime();

      browser.setAjaxController(new NicelyResynchronizingAjaxController());
      browser.setJavaScriptEnabled(true);

      HtmlPage page = browser.getPage(testUrl);

      // This is to avoid errors when background JS hasn't updated the DOM yet
View Full Code Here

  public void setUp() throws Exception {
    webClient = new WebClient();
    // NicelyResynchronizingAjaxController changes XHR calls from asynchronous
    // to synchronous, saving the test from needing to wait or sleep for XHR
    // completion.
    webClient.setAjaxController(new NicelyResynchronizingAjaxController());
    webClient.waitForBackgroundJavaScript(120000)// Closure can take a long time...
    webClient.setHTMLParserListener(HTMLParserListener.LOG_REPORTER);
    webClient.setTimeout(120000)// Closure can take a long time...

    alertHandler = new CollectingAlertHandler();
View Full Code Here

        WebClient webClient = new WebClient(BrowserVersion.FIREFOX_3);
        webClient.setRedirectEnabled(true);
        webClient.setThrowExceptionOnScriptError(false);
        //webClient.waitForBackgroundJavaScript(100000);
        //webClient.waitForBackgroundJavaScriptStartingBefore(100000);
        webClient.setAjaxController(new NicelyResynchronizingAjaxController());

        HtmlPage page = (HtmlPage) webClient.getPage("http://localhost:8080/store/store.html");

        HtmlForm form = (HtmlForm) page.getFormByName("catalogForm");
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController

Copyright © 2018 www.massapicom. 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.