Package com.gargoylesoftware.htmlunit

Examples of com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController


  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

    @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

    @Test(groups = { CONTEXTS })
    @SpecAssertions({ @SpecAssertion(section = "6.7.4", id = "l") })
    public void testConversationPropagatedAjax() throws Exception {

        WebClient webClient = new WebClient();
        webClient.setAjaxController(new NicelyResynchronizingAjaxController());

        HtmlPage storm = webClient.getPage(getPath("storm-ajax.jsf"));

        // Begin long-running conversation - note that we use ajax
        HtmlSubmitInput beginConversationButton = getFirstMatchingElement(storm, HtmlSubmitInput.class,
View Full Code Here

    this.applicationBaseURL = applicationBaseURL;
    this.javascriptTime = javascriptTime;
    webClient = new WebClient(BrowserVersion.FIREFOX_17);
    webClient.getOptions().setCssEnabled(true);
    webClient.getOptions().setThrowExceptionOnScriptError(false);
    webClient.setAjaxController(new NicelyResynchronizingAjaxController());
    }
View Full Code Here

      String proxyHost = wcSpec.getProxyHost();
      if (proxyHost != null) wc = new WebClient(wcSpec.getBrowserVersion(),
                                                proxyHost,
                                                wcSpec.getProxyPort());
      if (proxyHost == null) wc = new WebClient(wcSpec.getBrowserVersion());
      wc.setAjaxController(new NicelyResynchronizingAjaxController());
      wc.setWebConnection(new JSFUnitWebConnection(wc.getWebConnection()));
      wcSpec.setWebClient(wc);
     
      HttpSession session = getSessionFromThreadLocal();
     
View Full Code Here

           * @see net.sourceforge.jwebunit.htmlunit.HtmlUnitTestingEngineImpl#createWebClient()
           */
          @Override
          protected WebClient createWebClient() {
            WebClient wc = super.createWebClient();
            wc.setAjaxController(new NicelyResynchronizingAjaxController());
            return wc;
          }
         
        };
        return engine;
View Full Code Here

        final WebClient webClient = new WebClient();
        webClient.getOptions().setJavaScriptEnabled( false );
        webClient.getOptions().setCssEnabled( false );
        webClient.getOptions().setAppletEnabled( false );
        webClient.getOptions().setThrowExceptionOnFailingStatusCode( false );
        webClient.setAjaxController( new NicelyResynchronizingAjaxController() );
        return webClient;
    }
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.setHTMLParserListener(HTMLParserListener.LOG_REPORTER);

    alertHandler = new CollectingAlertHandler();
    webClient.setAlertHandler(alertHandler);
    token = createToken("canonical", "john.doe");
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.