from selenium.webdriver.common.by import By
qq = driver.find_element(By.CLASS_NAME,"buyer-cart-seller-order").find_elements(By.TAG_NAME,'span')
for i in qq:
t = i.text
print(t)
先是定位到父框,
driver.find_element(By.CLASS_NAME,“buyer-cart-seller-order”)
在去寻找子框
find_elements(By.TAG_NAME,‘span’)
寻找子框的时候,elements记得加 s 。