python自动化测试——iframe切换

from selenium import webdriver

driver = webdriver.Chrome()
driver.get("https://www.***.cn")

#切换到iframe1中
driver.switch_to.frame("iframe1")

#切换回默认
driver.switch_to.default_content()

driver.quit()

猜你喜欢

转载自www.cnblogs.com/nicole-zhang/p/10384242.html