Class HtmlUnitLogs

  • All Implemented Interfaces:
    org.openqa.selenium.logging.Logs

    public class HtmlUnitLogs
    extends Object
    implements org.openqa.selenium.logging.Logs
    Implementation of the Logs interface for HtmlUnit-based drivers.

    This class provides access to logging information produced by HtmlUnit’s WebConsole and exposes it through the standard WebDriver logging API. Log entries recorded by the browser are captured by an internal HtmlUnitLogs.HtmlUnitDriverLogger instance.

    Author:
    Ronald Brill
    • Constructor Detail

      • HtmlUnitLogs

        public HtmlUnitLogs​(WebClient webClient)
        Creates a new HtmlUnitLogs instance and configures the given WebClient to use an internal HtmlUnitLogs.HtmlUnitDriverLogger for WebConsole log output.
        Parameters:
        webClient - the HtmlUnit client whose WebConsole logger will be replaced with an HtmlUnitLogs.HtmlUnitDriverLogger; must not be null
    • Method Detail

      • get

        public org.openqa.selenium.logging.LogEntries get​(String logType)
        Specified by:
        get in interface org.openqa.selenium.logging.Logs
      • getAvailableLogTypes

        public Set<String> getAvailableLogTypes()
        Specified by:
        getAvailableLogTypes in interface org.openqa.selenium.logging.Logs