Reputation: 11
I'm trying to obtain the price text in the following html code:
<span class="item-price js-variant-price" content="79.95" itemprop="price">79,95 TL</span>
Using the code, i have this
prices2=driver.find_element(By.XPATH, "//span[@class='item-price.js-variant-price'")
but so far it can't get the "79.96" value, what am I doing wrong?
Upvotes: 0
Views: 168
Reputation: 4869
Your selector
"//span[@class='item-price.js-variant-price'"
is incorrect:
Correct XPath would be
"//span[@class='item-price js-variant-price']"
Also note that Price value might come from XHR so you might need to implement Wait to get it
Upvotes: 1