TypeError: object of type 'WebElement' has no len()
TypeError: object of type 'WebElement' has no len()
我收到这个错误,我已将元素更改为 css,id 但错误仍然存在
chekboxes = driver.find_element_by_xpath("//input[@type='checkbox']")
print(len(chekboxes))
将find_element_by_xpath
(用于搜索单个元素)替换为find_elements_by_xpath
(用于搜索元素列表)
我收到这个错误,我已将元素更改为 css,id 但错误仍然存在
chekboxes = driver.find_element_by_xpath("//input[@type='checkbox']")
print(len(chekboxes))
将find_element_by_xpath
(用于搜索单个元素)替换为find_elements_by_xpath
(用于搜索元素列表)