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

Handle native modals for alert, confirm and prompt #555

Open
adeprez opened this issue Aug 7, 2024 · 0 comments
Open

Handle native modals for alert, confirm and prompt #555

adeprez opened this issue Aug 7, 2024 · 0 comments

Comments

@adeprez
Copy link
Contributor

adeprez commented Aug 7, 2024

When a website calls window.alert, window.confirm and window.prompt it opens a browser popup modal. It will block navigation and any other possible interaction. Therefore, we'd like to make the World Model aware of these modal windows.

The navigation engine should be updated to describe open modals and to interact with them. A solution would be to return the modal as a fake HTML dialog with its actions - and optionaly its input field as HTML.

e.g for

confirm("Please input");

Retrieved HTML would be:

<dialog>
  Please input
  <input xpath="/dialog/input" />
  <button xpath="/dialog/button">Cancel</button>
  <button xpath="/dialog/button[2]">OK</button>
</dialog>
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

1 participant