I want to get text from browser by using uiautomator
How can I do it?
I've parsed structure of chrome
and there is only android.View.view
I've tried to use getText()
function, but it's not helped.
Any help appreciated.
Maybe somebody know how can I do it by calling some chrome instance... or with any other method.
Any solution, with info, how to save android browser page as html/text will be enough, or how to select whole page. (except touching/long pressing text).
UiDevice.getLastTraversedText() is the only way I know to get highlighted text in webview. I am also looking for a better way to test webview on Android.
Weirdly, UiDevice.getLastTraversedText() has never worked for me. Since Android 4.4 though, the elements are exposed as the android.view.View with its text or function as content descriptors. Does not work all the time, but it is a large improvement.
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