How to get WebView HTML page content after complete rendering?

  android, javascript, rendering, webview

enter image description hereThis topic was raised and discussed hundreds of times. None of them correpond to the case I am facing.Please read below before answering.

I want to use WebView do get some info received from a server response and displayed in WebView but after embedded javascript execution. The wanted info can change in server at any time, purpose is to store this info locally on client side post requests to update it on on-demand basis.

I use WebChromeClient to determine when page is loaded (onProgressChanged = 100%) and JavaScriptInterface to get the HTML content, but I get the source code (with javascripts not executed yet).

The info I want to catch is available only after javascripts execution. Please see attached diagram, it may help to clarify my concern.

If someone was faced to similar issue I would appreciate to know how it was resolved.
Thanks

Source: Android Questions

LEAVE A COMMENT