Reputation: 725
I am trying to autologin into facebook using javascript and iam using awesomium as webcontrol in my c# application which can execute javascripts.i need the right javascript to autofill both textbox and click the login button URL:https://www.facebook.com/login
string pass="password";
string email="[email protected]";
webControl1.ExecuteJavascript("document.getElementById('email').value="+email);
webControl1.ExecuteJavascript("document.getElementById('pass').value="+pass);
webControl1.ExecuteJavascript("document.getElementsByName('u_0_1').click()");
but its not working can anyone figure this out
Upvotes: 0
Views: 828
Reputation: 8009
Your setting the same email field twice. Try...
webControl1.ExecuteJavascript("document.getElementById('email').value="+email);
webControl1.ExecuteJavascript("document.getElementById('pass').value="+password)
webControl1.ExecuteJavascript("document.getElementById('u_0_n').click()");
I'm not sure if password
is the correct id, you'll have to inspect the element yourself.
Upvotes: 1