Python Selenium Webdriver - Navigating nested frame sets

前端 未结 2 746
忘掉有多难
忘掉有多难 2020-12-11 07:25

I\'m working on a page with nested frames, and am unable to access a child frame. Brief outline of HTML source:


    
           


        
2条回答
  •  时光取名叫无心
    2020-12-11 08:08

    Try this:

    driver.switch_to_frame("name")
    driver.switch_to_frame("mid2")
    

    The issue you're running into is that javascript can only work with the current frame it sees. mid2 is in a child frame it cannot see if you're at the top of the document.

提交回复
热议问题