fix(browser): update browser context creation for current Puppeteer API and refresh build configuration
This commit is contained in:
@@ -55,14 +55,12 @@ export class IncognitoBrowser {
|
||||
|
||||
/**
|
||||
* Returns a new incognito browser context.
|
||||
* This uses Puppeteer's createIncognitoBrowserContext() API, which is the
|
||||
* correct method for creating isolated sessions.
|
||||
* This uses Puppeteer's current createBrowserContext() API for isolated sessions.
|
||||
*/
|
||||
public async getNewIncognitoContext(): Promise<plugins.puppeteer.BrowserContext> {
|
||||
if (!this.browser) {
|
||||
throw new Error('You need to start the IncognitoBrowser instance first');
|
||||
}
|
||||
// @ts-ignore
|
||||
return this.browser.createIncognitoBrowserContext();
|
||||
return this.browser.createBrowserContext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user