Package com.gargoylesoftware.htmlunit

Examples of com.gargoylesoftware.htmlunit.IncorrectnessListener


    MockWebConnection webConnection = new MockWebConnection();
    webConnection.setDefaultResponse(html);
    WebClient webClient = new WebClient();
    webClient.setWebConnection(webConnection);
    webClient.getOptions().setThrowExceptionOnScriptError(false);
    webClient.setIncorrectnessListener(new IncorrectnessListener() {
      @Override
      public void notify(String arg0, Object arg1) {
      }
    });
    return webClient.getPage("http://blah");
View Full Code Here


  protected WebClient modifyWebClient(WebClient client) {
    client.setAjaxController(new NicelyResynchronizingAjaxController());

    //Disables stuff like this "com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify WARNING: Obsolete content type encountered: 'text/javascript'."
    if (!this.debug) {
      client.setIncorrectnessListener(new IncorrectnessListener() {
        @Override
        public void notify(String message, Object origin) {
        }
      });
    }
View Full Code Here

     * Notifies the registered {@link IncorrectnessListener} of something that is not fully correct.
     * @param message the notification to send to the registered {@link IncorrectnessListener}
     */
    protected void notifyIncorrectness(final String message) {
        final WebClient client = getPage().getEnclosingWindow().getWebClient();
        final IncorrectnessListener incorrectnessListener = client.getIncorrectnessListener();
        incorrectnessListener.notify(message, this);
    }
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.IncorrectnessListener

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.