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.

Updated unit tests

Jan Curn83e1cbd2fb8a
diff --git a/test/webdriver.js b/test/webdriver.js
index 64e94d481..061cf5572 100644
--- a/test/webdriver.js
+++ b/test/webdriver.js
@@ -271,7 +271,7 @@ describe('Apify.launchWebDriver()', function () {
let webDriver;
const opts = {
headless: true,
- userAgent: 'MyUserAgent/1234',
+ userAgent: 'MyUserAgent/1234 AnotherString/456',
};
return Apify.launchWebDriver(opts)
.then((result) => {
@@ -403,7 +403,8 @@ describe('Apify.browse()', function () {
url: 'http://www.whoishostingthis.com/tools/user-agent/',
headless: true,
browserName: 'chrome',
- userAgent: 'MyUserAgent/1234',
+ // Have space in user-agent to test passing of params
+ userAgent: 'MyUserAgent/1234 AnotherString/456',
};
return Apify.browse(opts)
.then((result) => {