I am trying to get the (non-empty) text of a ViewGroup on Android (android.view.ViewGroup
) but it appears to be blank. I tried to use viewGroup.getText()
and viewGroup.getAttribute('text')
, but both seem to give me empty strings. I am quite certain I am extracting text from the correct WebElement
.
I tried to extract the text from another separate android.widget.TextView
object, and the text was correct.
Is the empty string problem due to me extracting text from a ViewGroup
? Is it the case that I can only extract text from a TextView
or an EditText
? If so, is there a way to extract text from a ViewGroup
?