I have HTML:
<div class="value">
<div style="float: right;">100.00</div>
<span class="yellow">Frequency:</span>
</div>
With selenium By.XPATH '//*[text()="Frequency:"]' I'm able to locate the <span>
element. My goal is to get the innerText of the previous <div>
.
Can I do it with selenium or should I use bs4 for this task?
I tried selenium.parent with documentation, but unable to do.
PS: I can't find the parent element or the div I need directly.