WebPagetest Forums

Full Version: Login script not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?...omPath=%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();
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.
(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.
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/usi...ntication/
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
Reference URL's