在以下页面:https : //teleservices.ac-nancy-metz.fr/login/ct_logon_vk.jsp
并使用以下几行填写登录字段和密码字段,但是当我手动或以编程方式验证时,这些字段似乎没有填写
webView = (WebView) findViewById(R.id.travail_activity_webview);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setSupportZoom(true);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setSupportZoom(true);
webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setDomStorageEnabled(true);
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String urlNewString) {
if (!loadingFinished) {
redirect = true;
}
loadingFinished = false;
view.loadUrl(urlNewString);
return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
loadingFinished = false;
}
@Override
public void onPageFinished(WebView view, String url) {
Log.e("Page finished", "url : " +url);
if(!redirect){
loadingFinished = true;
}
if(loadingFinished && !redirect){
if (!connected) {
completionIdentifiants();
connected=true;
} else if (!portailled){
accesPortail();
portailled=true;
}
} else{
redirect = false;
}
}
});
private void accesPortail() {
webView.loadUrl("https://teleservices.ac-nancy-metz.fr/login/ct_logon_vk.jsp");
}
字段直观填写,但提交后不取值。他们的内容只是被删除了......
我尝试了很多组合,都没有成功。
青春有我
相关分类