There are a few ways to tackle this so relax in the knowledge something will work for you. I’m with Timo, I’d use CSS selectors for this (that’s what browsers do natively, so why not?)
First, take a read of this article I posted a while back. There’s a section devoted to dealing with iframes. Get that knowledge under your belt and then post back if you still have questions/problems.
And just for completeness, you might also benefit from a related article: DevTools
The below assumes that your page contains one (and only one) iframe, and that it is not nested inside another iframe:
1.) In your test object, you just need one row, Name = “xpath”, Condition = “equals”, Value = “//iframe”, Detect object by? = checked
2.) Switch to the frame with the below code:
Again, this assumes you are working with only 1 iframe. If there are multiple frames, or nested frames, you will need a more specific xpath to find the right one.