selectFrame - Selenium IDE
selectFrame (frame identifier) - Selenium IDE command
You need to use the selectFrame command in selenium when your page contains iframes and you have to perform some action on element inside iframe. You need to provide name or id attribute of iframe element into target column. Exactly the same command also works for frames, in exactly the same way.
- relative=top - go back to the top frame (= outside all frames)
- index=0,1,2,3,... - go inside the n-th frame
Do not confuse selectFrame with selectWindow, which is used to select browser tabs.
This macro clicks inside an iframe. The first selectFrame relative=top is not really needed, as we are already still in the top frame. We would need it once we are inside a frame and want to get out again.
Related Demo Macros
The ready-to-import-and-run source code of all demo macros can be found in the Github repository testmacros folder.
Anything wrong or missing on this page? Suggestions?
...then please contact us.