You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
When switching to a frame by index, the different web driver implementations may select
different frames. This happens only if additional (i)frames were created by JavaScript
code. For example, if there is a page with an iframe and some JS inserts a second iframe
*before* the first frame, some of the drivers get confused.
There are two issues. First, of course all drivers should select the same (i)frame
in this situation.
Second, the web driver documentation should be more precise:
"Select a frame by its (zero-based) index. That is, if a page has three frames, the
first frame would be at index "0", the second at index "1" and the third at index "2"."
It is not clear what exactly is meant with "first" frame, etc. Is it the first frame
in the DOM tree or is it the first frame created? From the user's point of view, "first
in DOM tree" is probably the better choice.
Selenium version: 2.2.0
OS: Windows 7
Reported by jw_google@gmx.de on 2011-08-01 11:21:25
The text was updated successfully, but these errors were encountered:
It is specified in the standard [1]:
---
If the "id" is a number the current context is set to the equivalent of the JS expression
"window.frames[n]"
---
So it's up to the browser vendor to define frame order.
Javadoc is updated.
If you feel it can be non-deterministic please use other ways to specify a target frame.
[1] https://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html#switching-frames
Specification changed, see [1] and [2]
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=972902
[2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=24662
Originally reported on Google Code with ID 2162
Reported by
jw_google@gmx.de
on 2011-08-01 11:21:25The text was updated successfully, but these errors were encountered: