Skip to content
CodeKruPro

Nested Frames

48/70

Nested Frames

For nested iframes, chain frameLocator() calls. The nested frame structure:

<iframe name="nestedFrame">
  <h2>Parent frame</h2>
  <iframe>
    <h3>Child frame</h3>
  </iframe>
</iframe>

Task:

  1. Navigate to https://testkru.com/Interactions/Frames
  2. Access the parent frame and print its h2 text
  3. Chain another frameLocator('iframe') to access the child
  4. Print the child frame h3 text

Expected output:

Parent: Parent frame
Child: Child frame