Turning HtmlUnit Warnings off

Put this somewhere around the start of your code; it will shut its dirty mouth: LogFactory.getFactory().setAttribute(“org.apache.commons.logging.Log”, “org.apache.commons.logging.impl.NoOpLog”); java.util.logging.Logger.getLogger(“com.gargoylesoftware.htmlunit”).setLevel(Level.OFF); java.util.logging.Logger.getLogger(“org.apache.commons.httpclient”).setLevel(Level.OFF); webClient = new WebClient(bv); webClient.setCssEnabled(false); webClient.setIncorrectnessListener(new IncorrectnessListener() { @Override public void notify(String arg0, Object arg1) { // TODO Auto-generated method stub } }); webClient.setCssErrorHandler(new ErrorHandler() { @Override public void warning(CSSParseException exception) throws CSSException { // TODO … Read more