I have the following span class:
<span class="k-pager-info k-label">1 - 25 of 93995 items</span>
and its Xpath is
//*[@id="registerGrid"]/div[3]/span
I would like to get the number 93995 out.
I have tried the following:
driver.findElement(By.xpath("""//*[@id="registerGrid"]/div[3]/span""")).getText()
Traceback (most recent call last):
File "<pyshell#47>", line 1, in <module>
driver.findElement(By.xpath("""//*[@id="registerGrid"]/div[3]/span""")).getText()
AttributeError: 'WebDriver' object has no attribute 'findElement'
What shall I do then?
textinstead ofgetText()in python