java,selenium-webdriver,htmlunit-driver
get(url) is the method used to load web page in browser. But for that I coulnd't find out what is exact timeout for page load looking at here If, in your case, page isn't loaded and timeout error is thrown then you can use pageLoadTimeout method....
javascript,selenium,phantomjs,htmlunit,htmlunit-driver
Extend HtmlUnitDriver and implement a ScriptPreProcessor (for editing content) and a HttpWebConnection (for allowing/blocking URLs): public class FilteringHtmlUnitDriver extends HtmlUnitDriver { private static final String[] ALLOWED_URLS = { "https?://localhost.*", "https?://.*\\.yes.yes/?.*", }; private static final String[] DISALLOWED_URLS = { "https?://spam.nono.*" }; public FilteringHtmlUnitDriver(DesiredCapabilities capabilities) { super(capabilities); } @Override protected WebClient modifyWebClient(WebClient...
java,log4j,htmlunit,htmlunit-driver
Because both HttpClient and HtmlUnit uses log4j to also write their logs. Your rootLogger defines trace level, so it writes everything. Please add the below to allow only error level messages for HttpClient and HtmlUnit. log4j.logger.com.gargoylesoftware.htmlunit=error log4j.logger.org.apache.http=error ...