Skip to content Skip to sidebar Skip to footer

How To Inject A String Into Android WebView

I am loading a simple webpage, with a Text Field named 'AddSerialNum'
Serial Number:
Then I am trying to p

Solution 1:

Found the answer myself.

The following code should be used.

browser.loadUrl("javascript:document.forms[0].AddSerialNum.value = '"+contents+"';");

It seems that you have to navigate to that field by nodes, rather than just the final field.


Post a Comment for "How To Inject A String Into Android WebView"