Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
chore(e2e): fix indefinite wait in `puppeteer-store-pagination` (#3041)
Jindřich Bär25a6b6033eb5
diff --git a/test/e2e/puppeteer-store-pagination/actor/main.js b/test/e2e/puppeteer-store-pagination/actor/main.jsindex 9fc671606..85e4a355e 100644--- a/test/e2e/puppeteer-store-pagination/actor/main.js+++ b/test/e2e/puppeteer-store-pagination/actor/main.js@@ -63,11 +63,8 @@ crawler.router.addHandler('DETAIL', async ({ log, page, request: { url } }) => {const rawPrice = rawPriceString.split('$')[1];const price = Number(rawPrice.replaceAll(',', ''));- const inStock = await page- .locator('span.product-form__inventory')- .filter((el) => el.textContent.includes('In stock'))- .map((el) => !!el)- .wait();+ const inStockElement = await page.$('span.product-form__inventory');+ const inStock = (await inStockElement?.evaluate((el) => el.textContent.includes('In stock'))) ?? false;const results = {url,