Merge branch 'develop' into iframe

This commit is contained in:
Rohit
2025-01-04 15:51:51 +05:30
committed by GitHub
56 changed files with 3858 additions and 657 deletions

View File

@@ -111,13 +111,21 @@ export default class Interpreter extends EventEmitter {
private async applyAdBlocker(page: Page): Promise<void> {
if (this.blocker) {
await this.blocker.enableBlockingInPage(page);
try {
await this.blocker.enableBlockingInPage(page);
} catch (err) {
this.log(`Ad-blocker operation failed:`, Level.ERROR);
}
}
}
private async disableAdBlocker(page: Page): Promise<void> {
if (this.blocker) {
await this.blocker.disableBlockingInPage(page);
try {
await this.blocker.disableBlockingInPage(page);
} catch (err) {
this.log(`Ad-blocker operation failed:`, Level.ERROR);
}
}
}
@@ -678,7 +686,11 @@ export default class Interpreter extends EventEmitter {
workflowCopy = this.removeIframeSelectors(workflowCopy);
// apply ad-blocker to the current page
await this.applyAdBlocker(p);
try {
await this.applyAdBlocker(p);
} catch (error) {
this.log(`Failed to apply ad-blocker: ${error.message}`, Level.ERROR);
}
const usedActions: string[] = [];
let selectors: string[] = [];
let lastAction = null;