Reputation:
I have a input field that I need to confirm has text in it. I don't care what is in it; just that there is text in it, that that text is a number and what that number is.
I have tried get_attribute()
and that is giving me nothing.
This is an example of the html:
<td>
<input id="quota" type="text" value="100.0" name="quota" size="3"></input>MB (0 for unlimited)
</td>
I am writing the tests in python.
Does anyone have any ideas?
Upvotes: 0
Views: 82
Reputation: 8386
That's because there is no text inside that input.
If you are trying to get the 100.0
, then you need to select the input element, and then do get_attribute("value")
.
If you want the MB (0 for unlimited)
, then you need to select the text inside the td
element.
Upvotes: 2