Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate JavaScript confirmation dialog acceptance #107

Open
esteban-filardi opened this issue May 9, 2022 · 2 comments
Open

Automate JavaScript confirmation dialog acceptance #107

esteban-filardi opened this issue May 9, 2022 · 2 comments

Comments

@esteban-filardi
Copy link

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?');

image

@esteban-filardi esteban-filardi changed the title automate JavaScript confirmation dialog acceptance Automate JavaScript confirmation dialog acceptance May 9, 2022
@esteban-filardi
Copy link
Author

I was able to make the automation work by overriding the windows.confirm method to return true using an inject action.

@Manvel
Copy link
Member

Manvel commented Dec 25, 2023

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 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants