|
Script Windows Live ID Login?
|
|
04-19-2011, 11:59 AM
Post: #1
|
|||
|
|||
|
Script Windows Live ID Login?
My site allows users to login with a Windows Live ID, but I'm having some trouble automating login. I've tried it using the pagetest browser plug-in so I could get some debugging info and it fails on my attempt to submitForm / click (I tried both ways).
Am I doing something wrong here? The below script repros the issue on the live.com homepage with a test account I setup just for this post. Code: logData 0Thanks, Nick |
|||
|
04-20-2011, 12:31 AM
Post: #2
|
|||
|
|||
|
RE: Script Windows Live ID Login?
Try this:
Code: logData 0You'll need to move the "logData 1" to the end and add whatever navigation you actually want to measure after the login but the login itself worked for me: http://www.webpagetest.org/result/110419...4bd1d79f7/ |
|||
|
04-20-2011, 03:03 AM
Post: #3
|
|||
|
|||
|
RE: Script Windows Live ID Login?
Ack, I feel so silly. It was because I had a space instead of a tab between the action and button ID! It might be a nice feature if the script parser accepted either (assuming there isn't a case where a space is used, I haven't read all of the scripting documents).
Thanks for the working version of the script! |
|||
|
04-20-2011, 03:13 AM
Post: #4
|
|||
|
|||
|
RE: Script Windows Live ID Login?
It should be able to parse scripts with spaces if you are using the web UI (on the public instance). I'll check the logic and make sure it can also deal with multiple spaces in case that tripped it up.
|
|||
|
04-20-2011, 03:44 AM
Post: #5
|
|||
|
|||
|
RE: Script Windows Live ID Login?
I was using the brower plugin to test that the scripts worked. Haven't actually tried it through the web UI yet (I'm using a private instance). I only had a single space, I reproduced the issue with your script by deleting the tab and adding a single space.
|
|||
|
04-20-2011, 04:54 AM
Post: #6
|
|||
|
|||
|
RE: Script Windows Live ID Login?
Hmm, so I'm trying to execute via the web UI and it seems the script has trouble on repeat view for my site. I don't think you'll be able to repro on Live.com since we're using an option in the API to turn off the user boxes and just display the same form again (it has the same IDs and everything, just has username pre-populated).
|
|||
|
04-20-2011, 04:58 AM
Post: #7
|
|||
|
|||
|
RE: Script Windows Live ID Login?
Sorry, the browser plugin doesn't have the script scrubbing logic (and the private instance code doesn't have it yet either).
Scripts do execute for repeat view tests but cookies aren't cleared between runs so you usually need to log out as part of the script so that the repeat view script can execute all of the steps. I don't (yet) have a good way to allow the repeat view to run a different sequence of steps. The script I uploaded unchecks the "remember me" box so the user name shouldn't be populated in that case. Thinking about it a bit, I might be able to add a couple of commands to let you identify blocks of a script to run only in first view or only in repeat view (with the default block logic to run in both). |
|||
|
04-20-2011, 05:22 AM
Post: #8
|
|||
|
|||
|
RE: Script Windows Live ID Login?
Hmm, watching closely, it seems that the line to disable Remember Me isn't working; the box remains checked. I ran through the scenario manually and when I uncheck it everything would go smoothly on a repeat run as the username isn't there.
I double-checked to make sure and the page I'm hitting does still have the name set to "remMe". Any ideas? Obviously the default / first / repeat switch case could solve this, but it seems odd the checkbox is failing to update. |
|||
|
04-20-2011, 05:52 AM
Post: #9
|
|||
|
|||
|
RE: Script Windows Live ID Login?
It's possible that the setValue command isn't actually working on checkboxes and I was imagining things when I thought it was working
I don't have any commands in the language to explicitly set the checked state so getting it to work properly is probably going to require a code change either way. I'll see if I can whip something up quickly tomorrow.
|
|||
|
04-22-2011, 04:49 AM
Post: #10
|
|||
|
|||
|
RE: Script Windows Live ID Login?
Sorry, got swamped with some other issues but I also remembered that you can execute arbitrary javascript so this looks like it works:
Code: logData 0If there are things that you might want to do in one pass but not another and you want it to just gracefully skip over them you can also add: Code: ignoreErrors 1Before the part of the code you expect to fail (like clicking on a button that is sometimes there but not always). |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
Search
Member List
Calendar
Help






I don't have any commands in the language to explicitly set the checked state so getting it to work properly is probably going to require a code change either way. I'll see if I can whip something up quickly tomorrow.