I'm trying to print the text for a table cell, but nothing is being printed. It's identifying the element, but doesn't seem to be able to locate the text.
The HTML looks like this:
<tr style="font-weight: 600;">
<td>
"
Available Balance
"
</td>
<td id="testBalance" class="text-right ng-binding" style="font-weight: 600;">
664,265.314
</td>
I'm trying to read (and print) the value of "664,256.314" by running:
Balance=driver.find_element_by_id("testBalance")
print (Balance.text)
It locates the element, but nothing gets printed. Does anyone know why this is happening?
htmlyou've provided and it worked fine for me.get_attribute('textContent')and see what that gives you.