You store tags in a variable,then a for loop over tags and use
Then use
.text
collect fixed result as show under in list.Then use
sum()
.span_tag = browser.find_elements_by_xpath('//span[@class="basket-item__price-total_discount js__total-price"]')For one tag it would be.
>>> span_tag[0].text '194 ₽' # Fix so only get 194 >>> span_tag[0].text.split()[0] '194' # Integer >>> int(span_tag[0].text.split()[0]) 194