【发布时间】:2021-03-31 21:15:38
【问题描述】:
我想在 selenium 中使用 click() 方法单击以 beautifulsoup 为目标的元素,但显示此错误:
'NoneType' object is not callable
我的代码示例:
from selenium import webdriver
from bs4 import BeautifulSoup
tabs = deals_tabs.find_all('div',{'class':'FilterSort__filter___36MvO'})
tabs.pop(0)
for tab in tabs:
category = tab.text
tab.click()
【问题讨论】:
-
欢迎来到 SO!请阅读minimal reproducible example 并相应地编辑您的帖子。
标签: selenium selenium-webdriver beautifulsoup webdriver click