Consider creating helper functions for common puppeteer commands
Opened this issue · 1 comments
austinkelleher commented
It may become tedious to constantly call window.puppeteerCommand(...)
. We could implement helper functions for common commands such as screenshot
, goto
etc.
My main concern is with this is that it may be confusing for people that only certain functions are exposed.
Thoughts @charlieduong94?
ctdio commented
Exposing a few helper functions would be nice to have. I'm in favor of possibly deprecating window.puppeteerCommand
(or maybe marking it as unsafe
) and exposing only a small subset of commands. Commands such as goto
can be harmful since it causes the current page to redirect, thus causing the test suite to stop.