Login To Google Account Using Htmlunit
I'm trying to login to Google Acccount through HtmlUnit, but still something is wrong and I'm getting login page. What I'm doing wrong? Set email Click next button Set password C
Solution 1:
I think what you did wrong was when you were looking for the "next" and the "sign in" buttons.
I'm pretty sure you need to do:
List<HtmlInput> buttonInputs = loginForm.getInputsByName("signIn");
Instead, you put
List<HtmlInput> buttonInputs = loginForm.getInputsByValue("signIn");
which isn't right because both the buttons have the same name of "signIn" when the "next button" has a value of "Next" and the "sign in" button has a value of "Sign in".
Post a Comment for "Login To Google Account Using Htmlunit"