-2

I am making a webscraper and have got a scraped number inside Pricefinal, for this instance right now it is 260, I am trying to find the xpath using the number I have inside Pricefinal but I am having issues with this line of code:

item = driver.find_elements_by_xpath("//*[contains(text(), 'Pricefinal')]")

When I execute the code it will only searh for the word Pricefinal instead of the value inside the string, I have tried using this code

item = driver.find_elements_by_xpath("//*[contains(text(), "(pricefinal)")]")``` but am getting unmatched errors on ]

The url is this.

justcurious
  • 839
  • 3
  • 12
  • 29

1 Answers1

0

Try to use XPATH axes to find all descendants inside tag with text "pricefinal". If you have any difficulties just place here html part and i can give u better advice

Andrei
  • 46
  • 4