fix: add await to enable blocker
This commit is contained in:
@@ -93,7 +93,7 @@ export class RemoteBrowser {
|
|||||||
const context = await this.browser.newContext();
|
const context = await this.browser.newContext();
|
||||||
this.currentPage = await context.newPage();
|
this.currentPage = await context.newPage();
|
||||||
const blocker = await PlaywrightBlocker.fromPrebuiltAdsAndTracking(fetch);
|
const blocker = await PlaywrightBlocker.fromPrebuiltAdsAndTracking(fetch);
|
||||||
blocker.enableBlockingInPage(this.currentPage);
|
await blocker.enableBlockingInPage(this.currentPage);
|
||||||
this.client = await this.currentPage.context().newCDPSession(this.currentPage);
|
this.client = await this.currentPage.context().newCDPSession(this.currentPage);
|
||||||
await blocker.disableBlockingInPage(this.currentPage);
|
await blocker.disableBlockingInPage(this.currentPage);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user