I want to simulate a click on a website on a submit-type button
this is the code for now, but apparently it does not work:
                                 String id = "x";
                                 String pw = "y";
                                 web.getSettings().setDomStorageEnabled(true);
                                 web.loadUrl("javascript: {" +
                                         "document.getElementsByName('authid')[0].value = '"+id +"';" +
                                         "document.getElementsByName('authpw')[0].value = '"+pw +"';" +
                                         "var submit = document.getElementsByClassName('inputbutton');" +
                                         "submit[0].submit(); };");
and this is how it looks like: Screenshot of Emulator
the code for the button on the website:
<input type="submit" value="OK" class="inputbutton">
thanks in advance :)
 
                        
thanks for the vote up, I've got the answer:
instead of
submit[0].submit();in the last line of the first code part it has to besubmit[0].click();