Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
puppeteer-utilz
is a OSS package that I developed for a new project I haveI would like to have some visibility so that anyone that finds it useful can provide feedback/contribute/etc
on the roadmap, features/stuff that will be coming in the next couple of months for v2 are:
As of v1.1.6, these are the available functions:
launchBrowser
opens the browser with a specificstartUrl
, sugar syntax topuppeteer.launch
&page.goto
typeInSelVal
type value given a specific selectorblockResources
block resources incoming from HTTP requests (such as stylesheets & images)findElByContent
find a DOMElement based on it's properties (i.e: an tag withìnnerText="foo"
clickInSel
click on a element based on a specific selectorgetFrame
useful when working against websites that use iframesasyncForEach
a way to use the functional.forEach
&async/await
retryOperation
a way to define the amount of times you want to retry a specific set of steps (i.e: try to fill a form)waitForFrame
wait for a iframe to be availablewaitForDownload
given a absolute path, wait for chrome to finish writing file contents to the given pathwaitUntilUrl
a different way towaitForNavigation
but only checking the current browser URL (works when you know what the next link is)setDownloadPath
tell chrome in which folder you want to download fies to.