hi, please try the following:
webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl("javascript:document.getElementsByName('school').value = 'schoolname'"); webView.loadUrl("javascript:document.getElementsByName('j_username').value = 'username'"); webView.loadUrl("javascript:document.getElementsByName('j_password').value = 'password'"); webView.loadUrl("javascript:document.forms['login'].submit()");
first line includes javascript
all other lines fill out the form and, finally, submit the form.
Look at the apostrophes of String, please, I edited my answer.
source share