fix: puppeteer connection with browser url (#3518)

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
Luiz Braga 2025-05-30 08:39:11 -03:00 • committed by GitHub
commit c6b6fb149b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -278,7 +278,7 @@ class Client extends EventEmitter {
await this.authStrategy.beforeBrowserInitialized(); await this.authStrategy.beforeBrowserInitialized();
const puppeteerOpts = this.options.puppeteer; const puppeteerOpts = this.options.puppeteer;
if (puppeteerOpts && puppeteerOpts.browserWSEndpoint) { if (puppeteerOpts && (puppeteerOpts.browserWSEndpoint || puppeteerOpts.browserURL)) {
browser = await puppeteer.connect(puppeteerOpts); browser = await puppeteer.connect(puppeteerOpts);
page = await browser.newPage(); page = await browser.newPage();
} else { } else {