function fn(o) { var time = java.lang.System.currentTimeMillis(); var pdfPath = time + '.pdf'; karate.write(o, pdfPath); karate.log('saved pdf to:', pdfPath); var html = '' + '\n
' + '\n'; var htmlPath = time + '.html'; karate.write(html, htmlPath); karate.log('saved html to:', htmlPath); karate.embed('(right-click and open in new tab)', 'text/html'); }