cba
cba copied to clipboard
Automate JavaScript confirmation dialog acceptance
Is there any way to automate the acceptance of a confirm dialog that was created with JavaScript ?
I mean, dialogs created in this fashion:
window.confirm('Do you accept?');
I was able to make the automation work by overriding the windows.confirm
method to return true
using an inject action.
I was able to make the automation work by overriding the windows.confirm method to return true using an inject action
This is smart!
Unfortunately there is no reliable way of clicking the native "OK" button as of my knowledge, but yeah, having confirmation trick in Functions may be a good idea. Love this trick ❤️