There is this website I need to log into with user and pass every time. I have been using the below code to inject code into the textbox in the website. (after I log in there is still more textboxes I need to fill in which I need automated)
wv.loadUrl("javascript:document.getElementById('SSUser_Logon_0-item-USERNAME').focus();");
wv.evaluateJavascript("try{document.activeElement.value='"+User+"';}catch(e){}",null);
I am now getting the error
Injecting input events requires the caller (or the source of the instrumentation, if any) to have the INJECT_EVENTS permission.
and
<uses-permission android:name="android.permission.INJECT_EVENTS" />
Throws an error that this permission is only granted to system apps
.
I need help to either inject the code, or find another alternative to automate filling in textboxes on a website.
from Automate Webview with INJECT_EVENTS permission
No comments:
Post a Comment