I want to select only the text "only this text" from the snipet below using XPath (in Java) but that text is random and I don't know what is written there.
<div class="A">
<input id="button" type="button">x</input>
only this random text
</div>
What is the simplest xpath?
//div[@class='A'][what next?]
I saw similar questions but answers are always too complicated and I would like to know the simplest way.
Also is there any other way, without using XPath (in Java),to get that text?
Thanks.