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

Need a way to click without any JS code on the stack #14158

Open
domenic opened this issue Nov 20, 2018 · 4 comments
Open

Need a way to click without any JS code on the stack #14158

domenic opened this issue Nov 20, 2018 · 4 comments

Comments

@domenic
Copy link
Member

domenic commented Nov 20, 2018

In writing the tests in #14157, I need to trigger clicks. However, I need to trigger them specifically like a user does, with no JavaScript code on the stack.

I'm unclear from the documentation whether that's possible. I can't figure out how to run my Chrome install in "testdriver mode" to figure it out myself. And, @gsnedders indicated in whatwg/html#4181 (comment) it might not be possible anyway. So, I want to open this issue to discuss.

For now I've made my tests -manual.html, but it would be great to automate them.

@gsnedders
Copy link
Member

@foolip @Hexcles do you know if there's any way to do this currently in Blink, or would this potentially be adding something to testdriver.js that can't be immediately implemented in Blink's runner?

@foolip
Copy link
Member

foolip commented Nov 21, 2018

With test_driver.click() backed by WebDriver there would already be no JS code on the stack. Maybe we can just add a test in infrastructure/ verifying that it is so, and eventually finding a way to support it in Blink too? It would become possible if @LukeZielinski's investigations into ./wpt run in Chromium pan out, or if we control content_shell using WebDriver/CDP in some other manner.

@Hexcles
Copy link
Member

Hexcles commented Nov 21, 2018

IIUC, test_driver.click() doesn't create a new stack frame because the function simply posts a message and then return; the parent window receives the message and asks WebDriver to click? Whereas the Blink internal API is a blocking JS call?

@foolip
Copy link
Member

foolip commented Nov 22, 2018

That's right.

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

No branches or pull requests

5 participants