Knowledge Base

  1. Home
  2. Knowledge Base
  3. General
  4. How-to
  5. Working with elements in frames
Working with elements in frames

You can indicate the frame by the frame name of frame ID.

// Access second frame (frame ID 1) in the page
.execute('document.getElementsByTagName("iframe")[1].contentWindow.document.getElementById("button").click()')

By default, an access to an element in the first frame in the page (frame ID 0) is supported without any need to indicate the frame, so you may try to access elements in the first frame without the need to indicate the frame first.

Was this article helpful?

Related Articles

Leave a Reply 0 comments

Leave a Reply: