Our dev and corporate sites have a slightly different frame hierarchy.
Very occasionally I need to reference an element in a different frame.
Unfortunately, I don't know where that frame will be in the hierarchy. I do however know it's id.
How can I find a frame or the specific element, when I don't know the exact structure?
For clarification In dev, it's basically just a page, containing a frame. I'm in the context of the frame, and was just using window.top.document to get the document I wanted.
In prod, the nesting is different, window.top.document doesn't work, as it is inside of two other frames.
I can't change this structure, it's just how our application portal works.