Re: [Bug 28131] New: Currently the spec defines switching to window by handle only, does it need by name too?

On 09/03/15 15:00, David Burns wrote:
> If memory serves part of the reason for not going with name was if you
> have something that was not unique then you would have to cycle through
> the windows. Instead of people getting lucky when there is only 1 name
> and it works and then suddenly stops working it was thought to remove
> the by name. It may feel longer but at least the right API use is
> suggested to the user.

I think the API that's currently suggested to the user is almost
entirely useless. If I open a window from script it seems like it's very
difficult to determine which window I opened, particularly if the page
itself may have opened or closed other windows (so simply cycling
through the list of open windows and looking for changes doesn't work).

Maybe the right way to fix this is to allow window objects to be sent
over the protocol in the same way as elements. So if I can get hold of
the window object from script I can select that window with webdriver.

Received on Monday, 9 March 2015 15:38:01 UTC