The Switch Frames category contains actions that allow you to switch the test's browsing context to iframes or back to the main window.
When you interact with an iframe on the webpage during recording, TestCafe Studio automatically adds the Switch Frames actions to the test.
Switch Context to Iframe #
The Switch Context to iframe action switches the test's browsing context to a specified iframe. TestCafe Studio performs the subsequent test actions in this iframe until it reaches the Switch Context to Main Window action in the test.
|Element Selector||Selector||Identifies an iframe on the tested page. The parameter accepts a Selector function that returns the iframe. For more information on how to set up this parameter, see Element Selector.|
Switch Context to Main Window #
The Switch Context to Main Window action switches the test's browsing context from an iframe back to the main window.
TestCafe Studio displays warnings when you reorder Switch Frames actions or move test actions between browsing contexts. After dragging, make sure the actions relate to their appropriate contexts. Otherwise, they can be executed incorrectly.