Sample Script 2

The following sample is slightly modified compared to sample1. It has not a fixed pausing period of 1 second. Instead the pausing is dynamic with a maximum time of 30 seconds.
This behavior is extremely helpful if you are testing with a service provider URL that is not https. In that case a security pop-up is displayed by Firefox that can not be confirmed programmatically. A interactive click on the popup might be necessary which may require different pausing times (depending on the user reaction).

Additionally in the sample checking for SSO success is done by validating the page title instead of a string in the page content.
SSOCheck sample 2

The script itself is displayed in table view below. The lines in red are required to store the test results in the tool and the green fields mark a loop which is necessary to run through all test cases. Do not delete these lines.

SSOCheck
label tt_start
open https://fedlet.idpee.com/sp/?idpEntityID=http%3A%2F%2Fidp.ssocircle.com
clickAndWait link=Run Fedlet (SP) initiated Single Sign-On using HTTP POST binding
storeTitle pageTitle
gotoIf storedVars[‘pageTitle’] != ‘SSOCircle Identity Provider (Login)’ skipLogin
type id=IDToken1 myUserName
type id=IDToken2 xxxxx
clickAndWait name=Login.Submit
label skipLogin
waitForCondition var w = ssochecktool.browserbot.getCurrentWindow(); !w.document.title.match(/Access rights validated/) &&  w.document.readyState =="complete"; 30000
gotoIf var w = ssochecktool.browserbot.getCurrentWindow(); w.document.title.indexOf("Fedlet") == -1; tt_error
tToolMarkResult 0
gotoLabel tt_start
label tt_error
tToolMarkResult 1
gotoLabel tt_start

Download the script here.