Hello guys, thanks for sharing this project, it's awesome
Do you think could be more or less easy add an .html for output rendered HTML?
Example:
const html = await chromeless
.goto('https://www.github.com')
.wait(5) // ideally wait until HTML is ready
.html()
Just in case it may be useful until feature lands into master
const html = await chromeless
.goto('https://www.github.com')
.wait(5 * 1000)
.evaluate(() => document.documentElement.outerHTML);
@vladgolubev thanks for the response!
One thing I'm thinking all the time is, instead of wait an arbitrary quantity of time, could be possible wait until an DOM event is emitted?
Something like
const html = await chromeless
.goto('https://www.github.com')
.wait('DOMContentLoaded')
.html()
I implemented this in #112. I named it getHtml() to avoid confusion with setHtml().
EDIT: This has been renamed to html() in #143.
.html() Implemented in #112. Watch out for the current 128KB size limitation as noted in #114. Waiting for event to fire is being tracked in #98.
Most helpful comment
@vladgolubev thanks for the response!
One thing I'm thinking all the time is, instead of wait an arbitrary quantity of time, could be possible wait until an DOM event is emitted?
Something like