How to navigate a subframe inside a frameset using Selenium WebDriver?

前端 未结 4 2197
梦谈多话
梦谈多话 2020-11-28 14:41

I need to get the result from the table \"td\". But before I can do that I need to navigate a frame that contains it. The frame is one of the frameset elements that belongs

4条回答
  •  感动是毒
    2020-11-28 15:23

    I agree, you cannot directly switch to a child frame. Also, make sure to switch to the defaultContent (driver.switchTo.defaultContent) every time you want to switch frame. With regard to your example, driver.switchTo().frame("mainFrame.0.child") --- this could also work, but you need to get rid of unnecessary quotation marks.

提交回复
热议问题