How to switch between frames in Selenium WebDriver using Java

后端 未结 7 1806
轮回少年
轮回少年 2020-11-22 13:31

I am using java with WebDriver.I have to switch between two frames. I have recorded the test case in selenium IDE and in that I got the values as selectFrame relative=top se

7条回答
  •  天涯浪人
    2020-11-22 13:45

    Need to make sure once switched into a frame, need to switch back to default content for accessing webelements in another frames. As Webdriver tend to find the new frame inside the current frame.

    driver.switchTo().defaultContent()
    

提交回复
热议问题