Class FluentDriverHtmlDumper


  • public class FluentDriverHtmlDumper
    extends java.lang.Object
    Takes HTML dump.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void takeHtmlDump​(java.lang.String fileName, java.util.function.Supplier<java.lang.String> htmlSupplier)
      Dumps the HTML provided by the html supplier to a file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FluentDriverHtmlDumper

        public FluentDriverHtmlDumper​(Configuration configuration)
    • Method Detail

      • takeHtmlDump

        public void takeHtmlDump​(java.lang.String fileName,
                                 java.util.function.Supplier<java.lang.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:
        java.lang.RuntimeException - when an error occurs during dumping HTML