chore: generate pair for url change event
This commit is contained in:
@@ -230,4 +230,19 @@ export class WorkflowGenerator {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user