Skip to content

How to work with elements inside a frame

This example demonstrates selecting a frame by interacting with the elements that are in frame.

In the solution shown below, you will see that the frame is selected using "selectFrame" command.

Solution:

Approach #1: Using name attribute
# Command Target Value
Select the frame using name attribute
1selectFrame //frame[@name="framemain"]


Approach #2: Using index number
# Command Target Value
Select the frame using index number
1selectFrame index=0

Tips, Tricks, Gotchas & Best Practices: 

  • You can also select frames using id attribute in the Target fields.
  • You can select parent frame, you can use "relative=parent" or "relative=top" or "index = -1".


Feedback and Knowledge Base