简体   繁体   中英

How can I get text from this span class using Selenium in Python?

I need to get the value of 5,2329 from this code using selenium in python. What should I do to properly do it?

<span class="chart-info-val ng-binding" ng-bind="graphicView.bidvalue">5,2329</span>

.

Have you tried with the below code.

print(driver.find_element_by_css_selector("span.chart-info-val.ng-binding").text)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM