WebPagetest Forums
Login script not working - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: General Discussion (/forumdisplay.php?fid=25)
+--- Thread: Login script not working (/showthread.php?tid=14753)



Login script not working - shraddha - 02-15-2017 07:44 PM

Hello, I am trying to login with the following script but unable to do so.
Could you please help me with this?


navigate https://www-secure.target.com/gam-login?retainPage=true&lnk=acct_nav_sign_in&origin=http://www.target.com&fromPath=%2F
exec document.getElementById("logonIdMain").value="XXXXXXXXXXX"
execAndWait $("#logonIdMain").trigger("focusout");
exec document.getElementById("logonPasswordMain").value="XXXXXX"
execAndWait $("#logonPasswordMain").trigger("focusout");
execAndWait document.querySelector("#signin-btn").click();


RE: Login script not working - akshayranganath - 02-16-2017 05:07 AM

I have not used scripting a lot but, it looks like you are mixing Jquery syntax with pure javascript code. The exec* commands should contain pure Javascript code in it.


RE: Login script not working - shraddha - 02-17-2017 07:00 PM

(02-16-2017 05:07 AM)akshayranganath Wrote:  I have not used scripting a lot but, it looks like you are mixing Jquery syntax with pure javascript code. The exec* commands should contain pure Javascript code in it.

I think jquery also works with exec command because I have other scripts which are working fine with jquery.

The similar script format is working for other websites like amazon and myntra.


RE: Login script not working - rviscomi - 02-22-2017 07:23 PM

Here's a template for authenticating with a login form:

Code:
logData 0
navigate http://www.example.com/login
setValue id=u username
setValue id=p password
submitForm id=login-form
logData 1
navigate http://www.example.com/profile/username

For more info see https://calendar.perfplanet.com/2015/using-webpagetest-authentication/


RE: Login script not working - manojkumar542 - 01-24-2019 03:42 PM

Even this format i tried was not working and i don't see much error info , could some one help me to get through login