I am trying to match the text and select the check box.
I am trying to get the text or the innerHTML
from the input tag of type checkbox
.
I tried getText()
; it returns blank, innerHTML
, innerText
returns null
.
I am able to fetch the value, and all the other associated attributes of the tag, but not the text.
I tried getting the text by executing the JavaScript code through Selenium, but that is also returning null
or blank. How can I fix this?
The text is visible - not hidden.
You could try using getAttribute("textContent") or getAttribute("value")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With