I am trying to get text (marked by hashtags).
<div class="XYZ">
<h5>
"
#######Reports due by##############
"
<span class="hbl" data-hint="task due date">
<i class="icon-boxy-sign"></i>
</span>
</h5>
<script type="jsv#61^"></script><script type="jsv#123_"></script>
<script type="jsv#60^"></script><script type="jsv#124_"></script>
<script type="jsv#59^"></script><p>#################07/10/2020#######################</p><script type="jsv/125^"></script>
<script type="jsv/52_"></script><script type="jsv/24^"></script>
<script type="jsv/42_"></script><script type="jsv/23^"></script>
</div>
Python line to get the text inside the hashtags:
txt = dat =wait(driver, 10).until(EC.visibility_of_element_located((By.CSS_SELECTOR, 'div[class="XYZ"]'))).text
I expect the line to print: "Reports due by" and "07/10/2020, I keep getting timeoutException and Unable to locate element errors.