Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automation WEB sel+Python
#4
(Jul-02-2020, 09:50 AM)ABVSVL Wrote: how to check the amount of goods and add up all the goods to see if the total price is changing?
This is what you should try yourself by using the code hint i have given,that how it's work here Wink
So to take it step further.
span_tag =  browser.find_elements_by_xpath('//span[@class="basket-item__price-total_discount js__total-price"]')
#print(span_tag)
total = []
for tag in span_tag:
    total.append(int(tag.text.split()[0]))

print(sum(total))
Output:
5194
Reply


Messages In This Thread
Automation WEB sel+Python - by ABVSVL - Jul-02-2020, 06:15 AM
RE: Automation WEB sel+Python - by snippsat - Jul-02-2020, 08:04 AM
RE: Automation WEB sel+Python - by ABVSVL - Jul-02-2020, 09:50 AM
RE: Automation WEB sel+Python - by snippsat - Jul-02-2020, 03:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Automation Engine on Python? jfha73 4 2,138 May-01-2020, 02:29 PM
Last Post: jfha73
  Python Script-To perform automation of excel values which need to be feeded into we mrinal3411 1 2,461 Jul-14-2018, 06:12 PM
Last Post: Larz60+
  [Intermediate] Python web Automation testing vardhhan 0 3,515 Feb-18-2018, 06:23 AM
Last Post: vardhhan
  Python Selenium Document Lookup and Download Automation Error - Target Machine active Guttmann 4 5,250 Apr-18-2017, 12:13 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020