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

Enable test_driver to interact with frames and new tabs/windows #23574

Open
thejohnjansen opened this issue May 13, 2020 · 5 comments
Open

Enable test_driver to interact with frames and new tabs/windows #23574

thejohnjansen opened this issue May 13, 2020 · 5 comments

Comments

@thejohnjansen
Copy link
Contributor

According to the readme (https://github.com/web-platform-tests/wpt/blob/57f28f89273e2f75324441948fefde94dda537f1/docs/writing-tests/testdriver.md):

"NB: presently, testdriver.js only works in the top-level test browsing context (and not therefore in any frame or window opened from it)."

And I cannot find any tests in WPT that have unique implementations/work-arounds for this issue. This feels like something that should be tested across browsers for interop. Microsoft has written some new tests that would very much like to be able to create a new window and switch focus to it in the way we do with python: test_driver.switchTo().window(windowId).

If there is an acceptable way to do this today and I'm just not able to find it, I would appreciate any help. Else, is this being worked on by anyone at present?

@jgraham
Copy link
Contributor

jgraham commented May 13, 2020

What are the tests actually trying to do? Do you need to run testdriver commands in the opened window?

@Hexcles
Copy link
Member

Hexcles commented May 13, 2020

"Switching to" (focusing on) the newly opened window is an OS/desktop-level action. IIRC, we use Flexbox and the newly opened window is focused by default.

(That said, you can't use testdriver in that new window at the moment.)

@thejohnjansen
Copy link
Contributor Author

thejohnjansen commented May 13, 2020

@jgraham that's exactly right: we want to then interact with the content in the new window by running testdriver commands.

It's analogous to something like:
driver.SwitchTo().Window(driver.WindowHandles.Last());
WebElement element = driver.findElement(By.id("foo"));

@foolip
Copy link
Member

foolip commented May 25, 2020

@Hexcles you meant Fluxbox there, right?

@stephenmcgruer
Copy link
Contributor

Tentatively marking backlog, since nobody is currently looking at this. Happy to upgrade to roadmap if we get someone to drive it forward.

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