18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
how to get innertext of browser
Hello,
I'm trying to get the innertext value of a browser, or more clearly of the "<body>" of a browser. I want it to work on Android browser.
I'm using java and I have tried browser.byxPath("/html/body").getText(), but android browser doesn't support xpath.
Can you give some sugestions? I hope is not a stupid question, but I've just started trying to do something with sahi.
Thanks,
Ioan
I'm trying to get the innertext value of a browser, or more clearly of the "<body>" of a browser. I want it to work on Android browser.
I'm using java and I have tried browser.byxPath("/html/body").getText(), but android browser doesn't support xpath.
Can you give some sugestions? I hope is not a stupid question, but I've just started trying to do something with sahi.
Thanks,
Ioan
Comments
Try this:
Regards,
dkulkarni
I've also used successfully
browser.fetch("document.body.innerText");
Your solution would work only on Internet Explorer though. The innerText property is used only in IE.
Regards,
dkulkarni