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

[Testdriver] bless() does not work if modal dialogs are open #41218

Open
domenic opened this issue Jul 28, 2023 · 5 comments
Open

[Testdriver] bless() does not work if modal dialogs are open #41218

domenic opened this issue Jul 28, 2023 · 5 comments
Labels

Comments

@domenic
Copy link
Member

domenic commented Jul 28, 2023

Discovered by @josepharhar. Because bless() appends a button to the root element and then tries to click it, and the root element has been made inert by the modal dialog, this fails.

I'm not sure if there's a good general fix here. You'd need some way of telling what the topmost modal dialog is. dialog:modal will find them all, but among them, which is topmost?

@nt1m
Copy link
Member

nt1m commented Jul 28, 2023

I'm not sure why we want to fix this personally. You shouldn't try to be clicking an inert element, unless you're explicitly testing that it's not clickable

@josepharhar
Copy link
Contributor

Ideally bless() wouldn't even append or click a button in the first place, but would internally do some sort of user activation thing so that we don't have to worry about the button being clickable in the first place. When I worked around this behavior to make it work when dialogs are open, I didn't even know that there was a button being added or clicked until I read into the implementation and realized that's why this wasn't working.

@domenic
Copy link
Member Author

domenic commented Jul 30, 2023

I'm not sure why we want to fix this personally. You shouldn't try to be clicking an inert element, unless you're explicitly testing that it's not clickable

I'm not trying to click an inert element. I'm trying to bless some API call as having user activation.

Ideally bless() wouldn't even append or click a button in the first place, but would internally do some sort of user activation thing so that we don't have to worry about the button being clickable in the first place.

+1.

@nt1m
Copy link
Member

nt1m commented Jul 30, 2023

Ah ok, this one is tricky, I wonder if it makes sense to pass an optional element parameter as context or similar. I think it makes some sense since user activation usually comes from somewhere on the page.

@gsnedders
Copy link
Member

Ideally bless() wouldn't even append or click a button in the first place, but would internally do some sort of user activation thing so that we don't have to worry about the button being clickable in the first place.

Relatedly: w3c/webdriver-bidi#359

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

No branches or pull requests

4 participants