Toffee now supports testing web sites that use iframe elements to draw together content from multiple sources into one browser window. Toffee’s iframe support comprises three commands: switch to frame <locator>, switch to parent frame, and switch to top frame.
switch to frame <locator> “zooms in” one level, into the iframe identified by the locator expression. Subsequent commands will be directed at the contents of that iframe. You can use any Toffee locator expression, including “by id”,”at xpath”, and “at selector”. iframes can be nested to any depth level, but you can only zoom in one level at a time. If you need to zoom into an iframe within an iframe, you must issue two switch to frame <locator> commands.
Examplesswitch to frame with id "innerFrame"switch to frame at xpath "//div[@id='container']/iframe"switch to frame at selector "div.container > iframe"
switch to parent frame “zooms out” one level, so that all subsequent commands will be directed at the parent of the current frame. This may be an enclosing iframe, or the topmost window. If you are already on the topmost window, this command will fail.
switch to top frame “zooms out” to the topmost level, so that all subsequent commands will be directed at the contents of the topmost window. If you are already on the topmost window, this command will succeed, but has no effect.
iframe support requires you to upgrade Toffee Performer to release 722 or greater. You can download the latest version of Performer for Windows, macOS, or Linux on the Downloads page.