chore: generate pair for url change event

This commit is contained in:
karishmas6
2024-06-08 00:09:34 +05:30
parent 11afd5c230
commit d03d7752c2

View File

@@ -229,5 +229,20 @@ export class WorkflowGenerator {
await this.addPairToWorkflowAndNotifyClient(pair, page);
};
public onChangeUrl = async(newUrl: string, page: Page) => {
this.generatedData.lastUsedSelector = '';
const pair: WhereWhatPair = {
where: { url: this.getBestUrl(page.url()) },
what: [
{
action: 'goto',
args: [newUrl],
}
],
}
await this.addPairToWorkflowAndNotifyClient(pair, page);
};
}