Skip to content

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.

test: try to remove timeouts from failing test

Martin Adámeke6446586f5d8
diff --git a/test/browser_launchers/puppeteer_launcher.test.js b/test/browser_launchers/puppeteer_launcher.test.js
index 4c8b05728..32cef886a 100644
--- a/test/browser_launchers/puppeteer_launcher.test.js
+++ b/test/browser_launchers/puppeteer_launcher.test.js
@@ -218,6 +218,7 @@ describe('Apify.launchPuppeteer()', () => {
try {
browser = await Apify.launchPuppeteer(opts);
const page = await browser.newPage();
+ await page.setDefaultNavigationTimeout(0);
// Add a test to go to an actual domain because we've seen issues
// where pages would not load at all with Chrome.
diff --git a/test/puppeteer_utils.test.js b/test/puppeteer_utils.test.js
index f6dc1de1e..a868b4318 100644
--- a/test/puppeteer_utils.test.js
+++ b/test/puppeteer_utils.test.js
@@ -243,6 +243,7 @@ describe('Apify.utils.puppeteer', () => {
const getResourcesLoadedFromWiki = async () => {
let downloadedBytes = 0;
const page = await browser.newPage();
+ await page.setDefaultNavigationTimeout(0);
// Cache all javascript files, png files and svg files
await Apify.utils.puppeteer.cacheResponses(page, cache, ['.js', /.+\.png/i, /.+\.svg/i]);
page.on('response', async (response) => {