I am attempting to auto fill a field in a WebView
. The page source of the webpage is here: http://pastebin.com/WKbj7XJh
I have javascript enabled in my WebView
and I have the following code in my WebViewClient
public void onPageFinished(final WebView view, String url) {
super.onPageFinished(view, url);
String website = "https://www.example.com/oauth_callback";
view.loadUrl("javascript:document.getElementById(\"application_callback_url\").value = '"+website+"';");
}
Instead of autofilling the field, I get a blank WebView that simply displays: "https://www.example.com/oauth_callback"
I used this question as a guide: Fill fields in webview automatically
All help is greatly appreciated.