1.更改了网址
2.需要自己确定css_selector
import time
from selenium import webdriver
driver = webdriver.Chrome()
'''
driver.get("http://www.baidu.com")
driver.find_element_by_id('kw').send_keys("selenium")
driver.find_element_by_id('su').click()
time.sleep(3)
'''
driver.get("https://www.学习.cn/98d5ae483720f701144e4dabf99a4a34/5957f69bffab66811b99940516ec8784.html")
'''
time.sleep(3)
checkboxes=driver.find_elements_by_css_selector('#Ca4gvo4bwg7400')
for checkbox in checkboxes:
checkbox.click()
selenium 008 定位一组元素并逐个打开
最新推荐文章于 2022-09-25 22:26:19 发布