jeudi 11 janvier 2018

Generating logs in puppeteer

I recently began utilizing puppeteer for e2e tests for my Angular application and have had a generally good experience. However, I wonder what is the best way to log and perhaps print this information for the QA team.

In my script I have something like:

(async () => {
...
page.on('console', msg => console.log('PAGE LOG:', msg.text));
...
}();

...this is OK as far as output in my terminal. But, how can I automate the process to generate something more comprehensive and readable? Do I need some other npm package for this...or does puppeteer/chromium offer anything?

Aucun commentaire:

Enregistrer un commentaire