Enhancement Request: Add steps to allow Webdriver to switch to frames/iframes
Closed this issue · 2 comments
Now, Iridium supports switching to new tab, new window and new alert. In some cases, have to handle the elements within iframes.
Unfortunately we can't create click events for iframes that are cross-domain using a JS method alone, however the web drivers should be able to switchTo
the frame
The step definition for TabAndWindow should be able to provide insight on an implementation.
Once the driver is switched to the iframe it should be possible to perform tasks as long as they're not javascript-assisted (ie. copying out values may not be possible, but entering them in as keystrokes should be - clicking elements targeted by a path should work, but sending click events by JS should not).
Requirements for this work should include:
- Step definitions for
"I switch to an iframe"
with variationsint index
String nameOrId
WebElement frameElement
- https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/WebElement.html#findElement-org.openqa.selenium.By-
- Step definition for
"I switch to the default content"
- an example complete with
README.md
, feature file and JNLP to execute- this is predicated on being able to find a publicly accessible page with iframe content to test
- update docs (may need assistance from @mcasperson - or he can update them if he brings this work in to his fork) to describe the new feature and any limitations
Pull request created