Here's what I did:
1-Create small "helper" scripts with functions you use all the time
2-One test case equals one keyword test
3-Call the small scripts in order to go through all your test case steps
This way, if you need to change something in the future, instead of going through all the tests to make that change, you can just change the helper script.
What I mean by helper scripts? Here's the example for a login page ('login.sj' file). I just made this in 5 minutes, if there's any error I'm sorry...
var passTxtBx;
function login(username, password)
{
setUsername(username);
setPassword(password);
passTxtBx = Sys.Browser().Page().Find("objectIdentifier", "passwordTxtBx", 50, true);
passTxtBx.keys("[Enter]");
if(checkWarning)
Log.Error("Login Error")
}
function setUsername(username)
{
Sys.Browser().Page().Find("objectIdentifier", "usernameTxtBx", 50, true).setText(username);
}
function setPassword(password)
{
passTxtBx.setText(pasword);
}
function checkWarning()
{
if(Sys.Browser().Page().Find("objectIdentifier", "warning", 50, true).Exists)
return true;
else
return false;
}