selenium-frame switching

1. Switch to which frame

(1)driver.switch_to.frame(''iframe neme'')

      attribute name or an ID attribute of the frame element

       Index values ​​start at 0: 0

       driver.switch_to.frame(driver.find_element_by_tag_name("xx")

   2. Switch to the main screen

driver.switch_to.default_content()

 

Guess you like

Origin www.cnblogs.com/iamshasha/p/11102783.html