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

On 03/03/15 20:43, David Burns wrote:
> Andreas pointed out that we came to a conclusion so have closed the bug.

It seems like the minutes didn't record why that decision was made. It
seems suboptimal for users (I don't know about implementations). For
example if I have:

<a href="foo" target=test>click me</a>

and I WebDriver a click() on the a, it might open a new window, or might
reuse an existing window with the name test. Assuming I now want to run
some commands against the opened document, I have a problem. If it opens
a new window I have to go through the hassle of getting window handles
before and after the action to see which one was added (and hoping that
script on the page didn't open or close any in the interim). If an
existing window was reused then it's not possible to tell which window
it opened in without either having previously recorded this somewhere,
or going through every open window and execute_script-ing to get the name.

I see there is at least some extra complexity required to decide if a
string is a window handle or a name, but that doesn't seem like a
insurmountable problem.

Received on Wednesday, 4 March 2015 14:58:05 UTC