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.
This is a request to expose a new property in IWebDriver and implement it.
IWebDriver.CurrentFrame
Returns a string with the name of the current frame that the driver instance is working
on or an IWebElement instance of the frame itself.
This in combination with a property in IWebElement to calculate its path from root
(path is defined as the list of frame/iframes) will make element fetch and r-use more
intuitive.
Today we have cluttered code having to implement the same ourselves. In our pages,
we constatnly keep hold of UI objects (which are encapsulation over IWebElemnt instances)
from across iframes in a single page. Before using any of them we need to call int
a "Switch". To be able to call into a "Switch" we need to have calculated a "Path"
and stored it.
This calculate and switch consumes a lot of time and causes reliability issues as well.
Reported by ravindrarupadhya on 2012-07-25 05:43:32
The text was updated successfully, but these errors were encountered:
This is possible with the existing API. We will not be adding a new method for it.
WebElement frameEl = driver.findElement(By.tagName("iframe"));
driver.switchTo().frame(frameEl);
// This will fail if frames are on different domains!
WebElement el = (WebElement) ((JavascriptExecutor) driver).executeScript(
"return window.frameElement");
assert frameEl.equals(el)
Originally reported on Google Code with ID 4305
Reported by
ravindrarupadhya
on 2012-07-25 05:43:32The text was updated successfully, but these errors were encountered: