Current time: 12-16-2017, 11:32 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
Find all posts by this user
Quote this message in a reply
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/
Visit this user's website Find all posts by this user
Quote this message in a reply
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
Find all posts by this user
Quote this message in a reply
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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)