selenium3+python3中的嵌套页面定位元素

from selenium import webdriver
from time import sleep

driver=webdriver.Firefox()

adddress="地址"

driver.get(adddress)

#进入嵌套的frame中寻找元素
driver.switch_to_frame("search")

driver.find_element_by_css_selector("").send_keys("")
sleep(3)

driver.find_element_by_css_selector("").click()
sleep(3)

driver.quit()
posted @ 2021-01-27 22:37  何心隐  阅读(195)  评论(0编辑  收藏  举报