github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/web/elm/benchmarks/benchmark.js (about) 1 const Web = require('../../wats/helpers/web'); 2 3 class Benchmark { 4 constructor() { 5 this.url = `file://${process.argv[2] || '/tmp/benchmark.html'}`; 6 this.web = new Web(this.url); 7 } 8 9 async run() { 10 await this.web.init(); 11 await this.web.page.goto(this.url); 12 await this.web.waitForText('Benchmark Report'); 13 const bodyHandle = await this.web.page.$('body > div > div'); 14 const html = await this.web.page.evaluate(body => body.innerText, bodyHandle); 15 await bodyHandle.dispose(); 16 console.log(html); 17 } 18 } 19 20 async function main() { 21 await new Benchmark().run(); 22 process.exit(0); 23 } 24 25 main();