Feature Release: iframe Support

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.

Examples

switch 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s