Is there a way to programmatically interact with the contents of a WebView?
For example, how could my app:
-
respond to an event (such as button clicked on a web page)
-
iterate through all the
INPUTelements in a page and retrieve their contents? -
Find all
DIVelements with the classstatusand change their content?
Thanks!
You can use Javascript to make a callback to Java for anything that Javascript can detect.
You can see a demo call JS to Java here: Android Calling JavaScript functions in WebView