fix(core): update

This commit is contained in:
Philipp Kunz 2021-01-12 14:24:21 +00:00
parent d94826a7b7
commit c91f77a0d4

View File

@ -31,6 +31,14 @@ export class IncognitoBrowser {
await this.browser.close(); await this.browser.close();
} }
/**
* rotate
*/
public async rotateBrowser () {
this.browser.close().catch();
this.browser = await getEnvAwareBrowserInstance();
}
public async getNewIncognitoContext(): Promise<plugins.puppeteer.BrowserContext> { public async getNewIncognitoContext(): Promise<plugins.puppeteer.BrowserContext> {
if (this.browser) { if (this.browser) {
return this.browser.createIncognitoBrowserContext(); return this.browser.createIncognitoBrowserContext();