In selenium if you know that the relative location of the frame you should be able to use the selectFrame command with the string "relative=up" to move it up a frame e.g. selenium.SelectFrame("relative=up"); or to jump to the top frame use "relative=top"