lib/grover/js/processor.js in grover-0.12.1 vs lib/grover/js/processor.js in grover-0.12.2

- old
+ new

@@ -105,9 +105,16 @@ const executeScript = options.executeScript; delete options.executeScript; if (executeScript !== undefined) { await page.evaluate(executeScript); } + // If specified, wait for selector + const waitForSelector = options.waitForSelector; delete options.waitForSelector; + const waitForSelectorOptions = options.waitForSelectorOptions; delete options.waitForSelectorOptions; + if (waitForSelector !== undefined) { + await page.waitForSelector(waitForSelector, waitForSelectorOptions) + } + // If we're running puppeteer in headless mode, return the converted PDF if (debug === undefined || (typeof debug === 'object' && (debug.headless === undefined || debug.headless))) { return await page[convertAction](options); } } finally {