python selenium2 获取span标签内的值
<span id="payment-text-price" class="text-danger ng-binding"> ¥8,000.01</span>采用amount = driver.find_element_by_id("payment-text-price").get_attribute('textContent')
或者 amount = driver.find_element_by_id("payment-text-price").text 都无法打印出 amount
logging.info(amount)日志中没有输入
先明确下是否能找到这个元素
页:
[1]