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.js APIs for opening/closing/switching/resizing windows #10666

Open
kereliuk opened this issue Apr 26, 2018 · 12 comments
Open

testdriver.js APIs for opening/closing/switching/resizing windows #10666

kereliuk opened this issue Apr 26, 2018 · 12 comments

Comments

@kereliuk
Copy link
Contributor

This is a tracker bug for 3 testdriver APIs

  • switch-to-window
  • open-new-window
  • get-current-window-handle
@kereliuk kereliuk self-assigned this Apr 26, 2018
@siusin
Copy link
Contributor

siusin commented Apr 27, 2018

Looking forward to this API!

Will it be possible for the future testdriver.js to simulate interaction between browsers and accessibility tools? f.ex. when the window is fully obscured by an accessibility tool.

@kereliuk kereliuk changed the title Provide a testdriver API for switching windows, getting window handles. and opening new windows Provide a testdriver API for switching windows, getting window handles and opening new windows Apr 27, 2018
@gsnedders
Copy link
Member

What's the use-case for this?

@foolip
Copy link
Member

foolip commented Sep 6, 2018

Open PRs for this:

What's the use-case for this?

I think the main one is minimizing the window to test document.visibilityState and other side effects of the browser window going into the background.

@siusin, did you have a specific use case in mind?

@foolip
Copy link
Member

foolip commented Sep 6, 2018

Since new PRs will have to be created, I'll close the PRs listed and treat it as part of this issue to send new ones, or one big PR perhaps.

@siusin
Copy link
Contributor

siusin commented Sep 10, 2018

It'd be nice if the UA is able to detect it when it's being obscured by another application, is it part of the get-current-window handle issue?

One use case is:
if the UA knows itself is being obscured by another application, and a view of the doc is displayed in an accessibility tool, the document.visibilityState much be specified as visible. Otherwise, it can be identified as hidden.

@gsnedders
Copy link
Member

That sounds like a much harder issue to solve (given you need to be able to run another application and control its window position/size).

@siusin
Copy link
Contributor

siusin commented Sep 12, 2018

I understand, that's going to be a bonus :)

@foolip
Copy link
Member

foolip commented Sep 12, 2018

Having played a bit with headless Chrome I wonder if there will be a problem here: if these APIs require a window manager and real windows to really work, and tests depend on them, then we can't ever run the tests headless, which would probably be nicer than our current behavior of windows flying around and taking focus.

@foolip
Copy link
Member

foolip commented Sep 26, 2018

@shubhie will you need this capability to test page lifecycle, or will you rely entirely on new WebDriver APIs?

Downgrading this issue to backlog since we don't yet have a clear use case.

@spanicker
Copy link
Contributor

That sounds reasonable, not sure if this is blocking us.
(BTW my github handle is @spanicker :) )

@foolip
Copy link
Member

foolip commented Jan 21, 2019

Renaming to also cover window resizing: https://w3c.github.io/webdriver/#set-window-rect

@foolip
Copy link
Member

foolip commented Jan 21, 2019

For resizing windows, there is also https://drafts.csswg.org/cssom-view/#dom-window-resizeto. That doesn't work in all contexts, but presumably does at least for a window opened by window.open().

@foolip foolip changed the title Provide a testdriver API for switching windows, getting window handles and opening new windows testdriver.js APIs for opening/closing/switching/resizing windows Jan 21, 2019
@gsnedders gsnedders removed their assignment Jan 31, 2020
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

6 participants
@gsnedders @foolip @spanicker @siusin @kereliuk and others