java - Invalid username or password WebView -
i need help, when try type in login , username , click log in button website returnes "wrong username or passord" if correct , in console loops, should do? thinking somehow allow follow links?
here webpage.java (the webview actitity)
public class webpage extends appcompatactivity { static webview mwebview; @override protected void oncreate(bundle savedinstancestate) { final string user = getintent().getextras().getstring("username"); final string pwd = getintent().getextras().getstring("password"); this.requestwindowfeature(window.feature_no_title); super.oncreate(savedinstancestate); setcontentview(r.layout.activity_web_page); mwebview = (webview) findviewbyid(r.id.webview2); string url = "http://www.webnotes.cz/"; mwebview.getsettings().setjavascriptenabled(true); mwebview.getsettings().setdomstorageenabled(true); cookiemanager.getinstance().setacceptcookie(true); mwebview.loadurl(url); mwebview.setwebviewclient(new webviewclient() { public void onpagefinished(webview view, string url) { view.loadurl("javascript:document.getelementbyid('uid0').value = '" +user+ "';document.getelementbyid('pass0').value='" +pwd+ "';javascript:document.getelementbyid('butlogon').click();"); } }); systemclock.sleep(1500); simpledateformat sdf = new simpledateformat("dd.mm.yyyy%20hh:mm:ss"); string date = sdf.format(new date()); mwebview.loadurl("http://www.webnotes.cz/distrib_v.asp?et='"+date+"'"); systemclock.sleep(2000); } public boolean oncreatewindow (webview view, boolean dialog, boolean usergesture, message resultmsg) { ((webview.webviewtransport) resultmsg.obj).setwebview(mwebview); resultmsg.sendtotarget(); return true; }
here console code:
w/bindingmanager: cannot call determinedvisibility() - never saw connection pid: 26296 w/webkit: resourcefetcher::requestresource, type = 0, policy = 3, url = https://www.webnotes.cz/distrib_v.asp?et=10.11.2016%2019:13:27 w/chromium: [warning:registry_controlled_domain.cc(356)] gettopdomain, host = webnotes.cz, topdomain = .cz w/chromium: [warning:registry_controlled_domain.cc(356)] gettopdomain, host = webnotes.cz, topdomain = .cz d/libc-netbsd: [getaddrinfo]: hostname=www.webnotes.cz; servname=(null); cache_mode=(null), netid=0; mark=0 d/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=(null); ai_flags=1024; ai_family=2 d/libc-netbsd: getaddrinfo: www.webnotes.cz result proxy >> d/surface: surface::setbuffersdimensions(this=0x7f91e28400,w=1080,h=1920) d/openssllib: opensslerr:module:13(114:155); file:external/openssl/crypto/asn1/asn1_lib.c ;line:145;function:asn1_get_object
thanks answers
Comments
Post a Comment