So I have started messing around with Selenium in python and I am just not able to figure this xpath out.
<div title style="left: 0px; to p: 490px;">
<svg viewbox="0 0 24 24" style="height: 10px; width: 10px;">...</svg>
<div title >
<div title >
<img title src="src.svg">
<div title ></div>
<div title > 1</div>
<div title >TOP</div>
</div>
</div>
I need to be able to locate the TOP and get the result of TOP.
Hopefully that makes sense and I provided what is needed.
CodePudding user response:
Try:
driver.find_element(By.XPATH, '//*[@]').text.splitlines[-1]