From fdf68348ccbd922bc53f954dc0052cfb37d59751 Mon Sep 17 00:00:00 2001 From: Jochen Delabie Date: Mon, 9 Nov 2026 18:05:20 +0100 Subject: [PATCH] Fix the Jest and WebdriverIO examples so the README commands pass - Jest: credentials in the wss:// userinfo were rejected ('Missing key or secret'); pass them in tb:options like the Puppeteer examples. Replace selectors that no longer exist on testingbot.com (.navbar-brand, .features). Guard browser.close() in afterAll. - WebdriverIO: specs path is resolved relative to the config file, so './examples/webdriverio/test.js' matched nothing; add the missing @wdio/testingbot-service dependency; same selector fixes. --- examples/jest/puppeteer.test.js | 32 +- examples/webdriverio/test.js | 13 +- examples/webdriverio/wdio.conf.js | 3 +- package-lock.json | 573 ++++++++++++++++++++++++++---- package.json | 11 +- 5 files changed, 547 insertions(+), 85 deletions(-) diff --git a/examples/jest/puppeteer.test.js b/examples/jest/puppeteer.test.js index 0f108a8..03b5ca0 100644 --- a/examples/jest/puppeteer.test.js +++ b/examples/jest/puppeteer.test.js @@ -1,21 +1,31 @@ const puppeteer = require('puppeteer-core'); -const TB_KEY = process.env.TB_KEY || 'Your TestingBot Key'; -const TB_SECRET = process.env.TB_SECRET || 'Your TestingBot Secret'; +const capabilities = { + 'tb:options': { + key: process.env.TB_KEY, + secret: process.env.TB_SECRET, + name: 'Jest-Puppeteer-Example' + }, + browserName: 'chrome', + browserVersion: 'latest', + platform: 'WIN10' +}; let browser; let page; beforeAll(async () => { browser = await puppeteer.connect({ - browserWSEndpoint: `wss://${TB_KEY}:${TB_SECRET}@cloud.testingbot.com/puppeteer?browserName=chrome&browserVersion=latest&platform=WIN10&name=Jest-Puppeteer-Example&screenRecorder=true` + browserWSEndpoint: `wss://cloud.testingbot.com/puppeteer?capabilities=${encodeURIComponent(JSON.stringify(capabilities))}` }); page = await browser.newPage(); await page.setViewport({ width: 1366, height: 768 }); }); afterAll(async () => { - await browser.close(); + if (browser) { + await browser.close(); + } }); test('TestingBot homepage title should be correct', async () => { @@ -25,20 +35,18 @@ test('TestingBot homepage title should be correct', async () => { }, 30000); test('TestingBot logo should be visible', async () => { - await page.waitForSelector('.navbar-brand'); + await page.waitForSelector('.navigation span'); const logoText = await page.evaluate(() => { - return document.querySelector('.navbar-brand').innerText; + return document.querySelector('.navigation span').innerText; }); expect(logoText).toContain('TestingBot'); }, 10000); -test('TestingBot features section should exist', async () => { - const featuresExist = await page.evaluate(() => { - return document.querySelectorAll('.features').length > 0; - }); - expect(featuresExist).toBe(true); +test('TestingBot navigation should link to the features page', async () => { + const featuresLinks = await page.$$('a[href="/features"]'); + expect(featuresLinks.length).toBeGreaterThan(0); }, 10000); test('Take a screenshot', async () => { await page.screenshot({ path: 'testingbot-jest.png' }); -}, 5000); \ No newline at end of file +}, 5000); diff --git a/examples/webdriverio/test.js b/examples/webdriverio/test.js index f79d3a9..37877f3 100644 --- a/examples/webdriverio/test.js +++ b/examples/webdriverio/test.js @@ -5,17 +5,16 @@ describe('TestingBot Website', () => { }); it('should display the TestingBot logo', async () => { - await $('.navbar-brand').waitForExist(); - const logoText = await $('.navbar-brand').getText(); - await expect(logoText).toContain('TestingBot'); + const logo = await $('.navigation span'); + await logo.waitForExist(); + await expect(logo).toHaveText(expect.stringContaining('TestingBot')); }); - it('should have a features section', async () => { - const featuresSection = await $('.features'); - await expect(featuresSection).toExist(); + it('should link to the features page', async () => { + await expect($('a[href="/features"]')).toExist(); }); it('should take a screenshot', async () => { await browser.saveScreenshot('testingbot-webdriverio.png'); }); -}); \ No newline at end of file +}); diff --git a/examples/webdriverio/wdio.conf.js b/examples/webdriverio/wdio.conf.js index 227433a..f994f29 100644 --- a/examples/webdriverio/wdio.conf.js +++ b/examples/webdriverio/wdio.conf.js @@ -5,8 +5,9 @@ exports.config = { user: TB_KEY, key: TB_SECRET, + // Spec paths are resolved relative to this config file specs: [ - './examples/webdriverio/test.js' + './test.js' ], maxInstances: 1, diff --git a/package-lock.json b/package-lock.json index f7ad4ee..0048eae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,12 +7,13 @@ "": { "name": "puppeteer-testingbot-example", "version": "1.0.0", - "license": "ISC", + "license": "MIT", "dependencies": { "@wdio/cli": "^9.14.0", "@wdio/local-runner": "^9.14.0", "@wdio/mocha-framework": "^9.14.0", "@wdio/spec-reporter": "^9.14.0", + "@wdio/testingbot-service": "^9.33.1", "jest": "^29.7.0", "puppeteer": "^24.8.2", "puppeteer-core": "^24.8.2", @@ -2246,6 +2247,384 @@ "node": ">=18.20.0" } }, + "node_modules/@wdio/testingbot-service": { + "version": "9.33.1", + "resolved": "https://registry.npmjs.org/@wdio/testingbot-service/-/testingbot-service-9.33.1.tgz", + "integrity": "sha512-gMSs/rMgvTbJl5vr44umSvL7+Onz8mmgR6gXFwYbme81x4y0WdrnybG71a1Gsmq7LBMA2GH8TIPlVtabt1kDxQ==", + "license": "MIT", + "dependencies": { + "@wdio/logger": "9.33.1", + "@wdio/types": "9.33.1", + "testingbot-tunnel-launcher": "^1.1.7", + "webdriverio": "9.33.1" + }, + "engines": { + "node": ">=18.20.8 <19 || >=20.20.2 <21 || >=22.23.4 <23 || >=24.22.1 <25 || >=26.12.1" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/@puppeteer/browsers": { + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.13.2.tgz", + "integrity": "sha512-5EUZSUIc37H6aIXyWO0Z4y8NlF8NnjgmqeQgOGiswAU7pY0HOo16ho4+alIWmSfdZnjqBRawMsP3I5YqLSn6kw==", + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.4.3", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.5.0", + "semver": "^7.7.4", + "tar-fs": "^3.1.1", + "yargs": "^17.7.2" + }, + "bin": { + "browsers": "lib/cjs/main-cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/@wdio/config": { + "version": "9.33.1", + "resolved": "https://registry.npmjs.org/@wdio/config/-/config-9.33.1.tgz", + "integrity": "sha512-pKVSbXQPmBN4V5RuLMky5DqxZEIPl96Mz//C4QO3QVuTHuVBGvGEkEg5NjwFiLUZTSZCdhEm35wGVwo49GGZeA==", + "license": "MIT", + "dependencies": { + "@wdio/logger": "9.33.1", + "@wdio/types": "9.33.1", + "@wdio/utils": "9.33.1", + "deepmerge-ts": "^8.0.0", + "glob": "^10.2.2", + "import-meta-resolve": "^4.0.0", + "jiti": "^2.6.1" + }, + "engines": { + "node": ">=18.20.8 <19 || >=20.20.2 <21 || >=22.23.4 <23 || >=24.22.1 <25 || >=26.12.1" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/@wdio/logger": { + "version": "9.33.1", + "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-9.33.1.tgz", + "integrity": "sha512-f2H2lK283MW/ATsWNyE8pEEeIOXUMlpzkVrdbjCYL0lEvj5FEdZG3s+0hnst2R5CM4YWoPj7CIJa1HaSw1W6zQ==", + "license": "MIT", + "dependencies": { + "chalk": "^5.1.2", + "loglevel": "^1.6.0", + "loglevel-plugin-prefix": "^0.8.4", + "safe-regex2": "^5.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18.20.8 <19 || >=20.20.2 <21 || >=22.23.4 <23 || >=24.22.1 <25 || >=26.12.1" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/@wdio/protocols": { + "version": "9.33.1", + "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-9.33.1.tgz", + "integrity": "sha512-UxXXF//bE8j/vERbPh8ENgFODnJdxeGH27eX8yOIRbuRiRXPBqRBiJ0dLWFseFGC+kteSZKBjMDGszKYSPnN2Q==", + "license": "MIT" + }, + "node_modules/@wdio/testingbot-service/node_modules/@wdio/repl": { + "version": "9.33.1", + "resolved": "https://registry.npmjs.org/@wdio/repl/-/repl-9.33.1.tgz", + "integrity": "sha512-Hc3dEV+HqDeuY9wNY6m2dDnaSmMErYKJhEYSlaQCTCq5DBesw3vzf4dBX43X6FCwPiDjh5ZQXYDV+yt4P9/WJQ==", + "license": "MIT", + "dependencies": { + "@types/node": "^20.1.0" + }, + "engines": { + "node": ">=18.20.8 <19 || >=20.20.2 <21 || >=22.23.4 <23 || >=24.22.1 <25 || >=26.12.1" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/@wdio/types": { + "version": "9.33.1", + "resolved": "https://registry.npmjs.org/@wdio/types/-/types-9.33.1.tgz", + "integrity": "sha512-2DbbcxiErZR/w0+ssuFmlOLMRsl+/Mktde6HvmBFQR+B7K0PIO3mt4l65oL+EYc6MgLHcKVFhPPCf/2KN+dUdw==", + "license": "MIT", + "dependencies": { + "@types/node": "^20.1.0" + }, + "engines": { + "node": ">=18.20.8 <19 || >=20.20.2 <21 || >=22.23.4 <23 || >=24.22.1 <25 || >=26.12.1" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/@wdio/utils": { + "version": "9.33.1", + "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-9.33.1.tgz", + "integrity": "sha512-NEjrHeJmxdxBPJWb0XfaTtGNm19TWAFzyAZuefht0gPSFWVY1yymU3vcVonzZ+jzhCwpfeeFeCHeoOXD9JxLTw==", + "license": "MIT", + "dependencies": { + "@puppeteer/browsers": "^2.13.2", + "@wdio/logger": "9.33.1", + "@wdio/types": "9.33.1", + "decamelize": "^6.0.0", + "deepmerge-ts": "^8.0.0", + "edgedriver": "^6.3.1", + "geckodriver": "^6.1.1", + "get-port": "^7.0.0", + "import-meta-resolve": "^4.0.0", + "locate-app": "^2.2.24", + "mitt": "^3.0.1", + "safaridriver": "^1.0.0", + "split2": "^4.2.0", + "wait-port": "^1.1.0" + }, + "engines": { + "node": ">=18.20.8 <19 || >=20.20.2 <21 || >=22.23.4 <23 || >=24.22.1 <25 || >=26.12.1" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/archiver": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-8.0.0.tgz", + "integrity": "sha512-fV1orZfsnPn9BaSByR/qE67rJCLJEy2Ox5bq7nJh+jquWaNh6Sfec75kJ2T6PtdGUbPQlrVoSVCEOa5SdiTQ1g==", + "license": "MIT", + "dependencies": { + "async": "^3.2.4", + "buffer-crc32": "^1.0.0", + "is-stream": "^4.0.0", + "lazystream": "^1.0.0", + "normalize-path": "^3.0.0", + "readable-stream": "^4.0.0", + "readdir-glob": "^3.0.0", + "tar-stream": "^3.0.0", + "zip-stream": "^7.0.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/compress-commons": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-7.0.1.tgz", + "integrity": "sha512-g0S8KAD8qf4+V//pr3BfB1aBnARLXNz2Gx+jmHU0LEriUuoQUOPOulVquHKTJ8+EAIIO7fhseNDr9wK5Q9FKBQ==", + "license": "MIT", + "dependencies": { + "crc-32": "^1.2.0", + "crc32-stream": "^7.0.1", + "is-stream": "^4.0.0", + "normalize-path": "^3.0.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/crc32-stream": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-7.0.1.tgz", + "integrity": "sha512-IBWsY8xznyQrcHn8h4bC8/4ErNke5elzgG8GcqF4RFPw6aHkWWRc7Tgw6upjaTX/CT/yQgqYENkxYsTYN+hW2g==", + "license": "MIT", + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/deepmerge-ts": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-8.0.2.tgz", + "integrity": "sha512-uqbvqLUMrc6p0MO+WBRtTxY55hmyh94WRwI5a++PZe54X+bfVh59FSN7uWCBCW1CCVjzjnrwzfI8zidE2obMMw==", + "funding": [ + { + "type": "ko-fi", + "url": "https://ko-fi.com/rebeccastevens" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/deepmerge-ts" + } + ], + "license": "BSD-3-Clause", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/geckodriver": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/geckodriver/-/geckodriver-6.1.1.tgz", + "integrity": "sha512-/AcCyc9o9o6hUbudaSJM2iOtXbxSLqQPOb4GrPvEN40cjraUeaX/j5kH3mSgwiroyMn7qzx2wM61AQ2XY8j3sA==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@wdio/logger": "^9.18.0", + "@zip.js/zip.js": "^2.8.11", + "decamelize": "^6.0.1", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.6", + "modern-tar": "^0.7.3" + }, + "bin": { + "geckodriver": "bin/geckodriver.js" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/htmlfy": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/htmlfy/-/htmlfy-0.8.1.tgz", + "integrity": "sha512-xWROBw9+MEGwxpotll0h672KCaLrKKiCYzsyN8ZgL9cQbVumFnyvsk2JqiB9ELAV1GLj1GG/jxZUjV9OZZi/yQ==", + "license": "MIT" + }, + "node_modules/@wdio/testingbot-service/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/readdir-glob": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-3.0.0.tgz", + "integrity": "sha512-AhNB2KgKeVJr16nK9LLZbJNWnYoT23ZrumNKFDebHBdkC8KHSqWo871JAUhoWC/RtjEVdqNMFpM6qrwRbaUqpw==", + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^10.2.2" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/yqnn" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/serialize-error": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-12.0.0.tgz", + "integrity": "sha512-ZYkZLAvKTKQXWuh5XpBw7CdbSzagarX39WyZ2H07CDLC5/KfsRGlIXV8d4+tfqX1M7916mRqR1QfNHSij+c9Pw==", + "license": "MIT", + "dependencies": { + "type-fest": "^4.31.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/webdriver": { + "version": "9.33.1", + "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-9.33.1.tgz", + "integrity": "sha512-STNxxNM42RhKWEenG/BmoN3lXgMI9R51vZ/9z1sSo/1uY8p/JL2gDGuMIvIzjuVRduy9puStom0judPEShQx7Q==", + "license": "MIT", + "dependencies": { + "@types/node": "^20.1.0", + "@types/ws": "^8.5.3", + "@wdio/config": "9.33.1", + "@wdio/logger": "9.33.1", + "@wdio/protocols": "9.33.1", + "@wdio/types": "9.33.1", + "@wdio/utils": "9.33.1", + "deepmerge-ts": "^8.0.0", + "https-proxy-agent": "^7.0.6", + "undici": "^6.27.0", + "ws": "^8.21.0" + }, + "engines": { + "node": ">=18.20.8 <19 || >=20.20.2 <21 || >=22.23.4 <23 || >=24.22.1 <25 || >=26.12.1" + } + }, + "node_modules/@wdio/testingbot-service/node_modules/webdriverio": { + "version": "9.33.1", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-9.33.1.tgz", + "integrity": "sha512-AsS8PlYshbyf2OLkYJsULNf6G/9tGkcra1a+Qju57Lt+SN36a+S8odRaJpvkoqnsEtjJBdXAa9bcNWCe1+DeqQ==", + "license": "MIT", + "dependencies": { + "@types/node": "^20.11.30", + "@types/sinonjs__fake-timers": "^8.1.5", + "@wdio/config": "9.33.1", + "@wdio/logger": "9.33.1", + "@wdio/protocols": "9.33.1", + "@wdio/repl": "9.33.1", + "@wdio/types": "9.33.1", + "@wdio/utils": "9.33.1", + "archiver": "^8.0.0", + "aria-query": "^5.3.0", + "cheerio": "^1.0.0-rc.12", + "css-shorthand-properties": "^1.1.1", + "css-value": "^0.0.1", + "grapheme-splitter": "^1.0.4", + "htmlfy": "^0.8.1", + "is-plain-obj": "^4.1.0", + "jszip": "^3.10.1", + "lodash.clonedeep": "^4.5.0", + "lodash.zip": "^4.2.0", + "query-selector-shadow-dom": "^1.0.1", + "resq": "^1.11.0", + "rgb2hex": "0.2.5", + "serialize-error": "^12.0.0", + "urlpattern-polyfill": "^10.0.0", + "webdriver": "9.33.1" + }, + "engines": { + "node": ">=18.20.8 <19 || >=20.20.2 <21 || >=22.23.4 <23 || >=24.22.1 <25 || >=26.12.1" + }, + "peerDependencies": { + "puppeteer-core": ">=22.x <=24.x" + }, + "peerDependenciesMeta": { + "puppeteer-core": { + "optional": true + } + } + }, + "node_modules/@wdio/testingbot-service/node_modules/zip-stream": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-7.0.5.tgz", + "integrity": "sha512-dSvYKdvLsAHCDqPOhIwk/q5CvuWtTB3Dgpoe0uVEFjTzIOAmsQpprX25InCvrvJsirEbu1OHyy67n/kAj1Sw/w==", + "license": "MIT", + "dependencies": { + "compress-commons": "^7.0.0", + "normalize-path": "^3.0.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@wdio/types": { "version": "9.14.0", "resolved": "https://registry.npmjs.org/@wdio/types/-/types-9.14.0.tgz", @@ -2283,14 +2662,14 @@ } }, "node_modules/@zip.js/zip.js": { - "version": "2.7.61", - "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.61.tgz", - "integrity": "sha512-+tZvY10nkW0pJoU88XFWLBd2O9PJPvEnDhSY/jQHfIroN5W5qGfPgFHKC4lkx0+9Vw/0IAkNHf1XBVInBkM9Vw==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.24.0.tgz", + "integrity": "sha512-WlaVKzdqBK+RF3bdiXZWbdCnvGB6PdO4IHC1mn/2Yfl3bASgqUNegnU3+PNg61iecwoPfUi5BgLUPqBukXpyWw==", "license": "BSD-3-Clause", "engines": { "bun": ">=0.7.0", "deno": ">=1.0.0", - "node": ">=16.5.0" + "node": ">=18.0.0" } }, "node_modules/abort-controller": { @@ -3400,9 +3779,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -3417,9 +3796,9 @@ } }, "node_modules/decamelize": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz", - "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.1.tgz", + "integrity": "sha512-G7Cqgaelq68XHJNGlZ7lrNQyhZGsFqpwtGFexqUv4IQdjKoSYF7ipZ9UuTJZUSQXFj/XaoBLuEVIVqr8EJngEQ==", "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -3643,27 +4022,65 @@ } }, "node_modules/edgedriver": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-6.1.1.tgz", - "integrity": "sha512-/dM/PoBf22Xg3yypMWkmRQrBKEnSyNaZ7wHGCT9+qqT14izwtFT+QvdR89rjNkMfXwW+bSFoqOfbcvM+2Cyc7w==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-6.3.1.tgz", + "integrity": "sha512-wCL/Ydgt0DPkWecjhhPj2/lnDxsGeHLPKeJYKKMTNol+ULFVg4WaTvxoB19GU4tieM6LSA3vZEdZxmDC0DwIpQ==", "hasInstallScript": true, "license": "MIT", "dependencies": { - "@wdio/logger": "^9.1.3", - "@zip.js/zip.js": "^2.7.53", - "decamelize": "^6.0.0", + "@wdio/logger": "^9.29.1", + "@zip.js/zip.js": "^2.8.11", + "decamelize": "^6.0.1", "edge-paths": "^3.0.5", - "fast-xml-parser": "^4.5.0", "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.5", - "node-fetch": "^3.3.2", - "which": "^5.0.0" + "https-proxy-agent": "^7.0.6", + "which": "^6.0.1" }, "bin": { "edgedriver": "bin/edgedriver.js" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" + } + }, + "node_modules/edgedriver/node_modules/@wdio/logger": { + "version": "9.33.1", + "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-9.33.1.tgz", + "integrity": "sha512-f2H2lK283MW/ATsWNyE8pEEeIOXUMlpzkVrdbjCYL0lEvj5FEdZG3s+0hnst2R5CM4YWoPj7CIJa1HaSw1W6zQ==", + "license": "MIT", + "dependencies": { + "chalk": "^5.1.2", + "loglevel": "^1.6.0", + "loglevel-plugin-prefix": "^0.8.4", + "safe-regex2": "^5.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18.20.8 <19 || >=20.20.2 <21 || >=22.23.4 <23 || >=24.22.1 <25 || >=26.12.1" + } + }, + "node_modules/edgedriver/node_modules/isexe": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-4.0.0.tgz", + "integrity": "sha512-FFUtZMpoZ8RqHS3XeXEmHWLA4thH+ZxCv2lOiPIn1Xc7CxrqhWzNSDzD+/chS/zbYezmiwWLdQC09JdQKmthOw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=20" + } + }, + "node_modules/edgedriver/node_modules/which": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-6.0.1.tgz", + "integrity": "sha512-oGLe46MIrCRqX7ytPUf66EAYvdeMIZYn3WaocqqKZAxrBpkqHfL/qvTyJ/bTk5+AqHCjXmrv3CEWgy368zhRUg==", + "license": "ISC", + "dependencies": { + "isexe": "^4.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" } }, "node_modules/ejs": { @@ -4048,24 +4465,6 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "license": "MIT" }, - "node_modules/fast-xml-parser": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.3.tgz", - "integrity": "sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - } - ], - "license": "MIT", - "dependencies": { - "strnum": "^1.1.1" - }, - "bin": { - "fxparser": "src/cli/cli.js" - } - }, "node_modules/fb-watchman": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", @@ -6112,6 +6511,15 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -6834,6 +7242,15 @@ "node": ">=10" } }, + "node_modules/modern-tar": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.7.7.tgz", + "integrity": "sha512-t9VmxaqrmANnEOBhpSDI6HD192Ge48k8vmWqQQL7hSFEqHEYwZbbsu49+aKLWZeRvFs3j1pMhXOqqF4kPlvjkQ==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -7850,6 +8267,15 @@ "fast-deep-equal": "^2.0.1" } }, + "node_modules/ret": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.5.1.tgz", + "integrity": "sha512-Z/nyvABwcRnRD2mMP7Kz6G1dFZZqX1mNErOnxF42OCQKE07b9k9hK9SQxHL3LFEZUdzQaLM4dId1E/E6Vm4WhA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/rgb2hex": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/rgb2hex/-/rgb2hex-0.2.5.tgz", @@ -7903,6 +8329,28 @@ ], "license": "MIT" }, + "node_modules/safe-regex2": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-5.1.2.tgz", + "integrity": "sha512-tAtCGFPPP02VroDVzp4daGi6bC7jWG+41D47GKf18FeH/ubvKQHT9VmhAkvtjNOmJwqtApzWeUpEhkyEYULvmw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT", + "dependencies": { + "ret": "~0.5.0" + }, + "bin": { + "safe-regex2": "bin/safe-regex2.js" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -7910,9 +8358,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -8331,18 +8779,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/strnum": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.1.2.tgz", - "integrity": "sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/NaturalIntelligence" - } - ], - "license": "MIT" - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -8368,9 +8804,9 @@ } }, "node_modules/tar-fs": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.8.tgz", - "integrity": "sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.3.tgz", + "integrity": "sha512-/hU4AXnIdZu+Gvl1pk0oI5f5HxWsCJRtY2aFaJdk9VvyL48DWU6iU5WAIPG+wIi1YvWA6eTJvIviP/tMAZZNwQ==", "license": "MIT", "dependencies": { "pump": "^3.0.0", @@ -8449,6 +8885,15 @@ "node": "*" } }, + "node_modules/testingbot-tunnel-launcher": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/testingbot-tunnel-launcher/-/testingbot-tunnel-launcher-1.2.0.tgz", + "integrity": "sha512-K8VOn6uX7S49ZwuTghTJbYncXiuKoB34t/sh8gstgQWMKFfnoQ3opwCgrOJkC8SjpkhfZNQk30Z4MueFQ6TWEw==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/text-decoder": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", @@ -8550,9 +8995,9 @@ "license": "MIT" }, "node_modules/undici": { - "version": "6.21.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.3.tgz", - "integrity": "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==", + "version": "6.29.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz", + "integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==", "license": "MIT", "engines": { "node": ">=18.17" @@ -8998,9 +9443,9 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", - "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", + "version": "8.22.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.22.2.tgz", + "integrity": "sha512-/rEZ2ejown2N5gxVTHUu9bVVC7ttu0/Tgzf5hbTOixR3Fs7mbbXgn2DbdbcKgJOmpQMtrIUWivtYuVMnp/W/yA==", "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index 9dcc89a..335d61a 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,15 @@ "test:webdriverio": "wdio run ./examples/webdriverio/wdio.conf.js", "test": "npm run test:puppeteer:chrome" }, - "keywords": ["puppeteer", "testingbot", "automation", "testing", "browser", "jest", "webdriverio"], + "keywords": [ + "puppeteer", + "testingbot", + "automation", + "testing", + "browser", + "jest", + "webdriverio" + ], "author": "", "license": "MIT", "description": "Examples of running Puppeteer tests on TestingBot's browser cloud", @@ -19,6 +27,7 @@ "@wdio/local-runner": "^9.14.0", "@wdio/mocha-framework": "^9.14.0", "@wdio/spec-reporter": "^9.14.0", + "@wdio/testingbot-service": "^9.33.1", "jest": "^29.7.0", "puppeteer": "^24.8.2", "puppeteer-core": "^24.8.2",