Issues logging in
|
12-09-2014, 02:52 AM
Post: #1
|
|||
|
|||
Issues logging in
Hi
I have a Moodle website that I want to log into and then measure a page load speed. I have been using the following script to achieve this: logData 0 navigate https://edu.eupati.eu/login/index.php sleep 15 logData 0 setValue id=username xxxxxxxxxxxxx setValue id=password xxxxxxxxxxxxx submitForm name=login sleep 15 logData 1 navigate https://edu.eupati.eu/mod/book/view.php?...pterid=773 I replaced the username and passwords with the actual username and password or should they be encoded? I cannot seem to get past the login page. Any help you can give me is greatly appreciated. Thanks J |
|||
12-09-2014, 11:59 PM
Post: #2
|
|||
|
|||
RE: Issues logging in
So I mostly use the exec script command to manipulate DOM elements when I script these days so I'd do something like this for the above case
logData 0 navigate https://edu.eupati.eu/login/index.php sleep 15 logData 0 exec document.getElementById('username').value='xxxxxx' exec document.getElementById('password').value='xxxxxx' execAndWait document.getElementById('loginbtn').click() sleep 15 logData 1 navigate https://edu.eupati.eu/mod/book/view.php?...pterid=773 Andy Using WebPageTest - http://usingwpt.com/ |
|||
12-10-2014, 02:22 AM
Post: #3
|
|||
|
|||
RE: Issues logging in
Thanks a million for your help Andy.
Your script is working as intended now. Thanks again J |
|||
12-11-2014, 06:32 AM
Post: #4
|
|||
|
|||
RE: Issues logging in
This is an excellent example, thank you for posting this. It would be worth adding this as an example in the docs - https://sites.google.com/a/webpagetest.o...ed-profile
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)