Support & information center

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
client.execute('document.getElementsByTagName("iframe")[1].contentWindow.document.getElementById("button").click()');Code language: JavaScript (javascript)

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