Class FluentDriverHtmlDumper


  • public class FluentDriverHtmlDumper
    extends Object
    Takes HTML dump.
    • Constructor Detail

      • FluentDriverHtmlDumper

        public FluentDriverHtmlDumper​(Configuration configuration)
    • Method Detail

      • takeHtmlDump

        public void takeHtmlDump​(String fileName,
                                 Supplier<String> htmlSupplier)
        Dumps the HTML provided by the html supplier to a file.

        If the configuration is set with an html dump path, the argument file name will be concatenated to that, creating the destination file path, otherwise the destination file will be the argument file name.

        If an error occurs during taking the HTML dump, the dump file is still created, but it will contain a message that HTML dump could not be taken.

        Parameters:
        fileName - the file name to dump the HTML to
        htmlSupplier - provides the HTML snippet that should be dumped
        Throws:
        RuntimeException - when an error occurs during dumping HTML