Scripting for authenticated pages

I am trying to create a script to test the authenticated pages. While using the DOM Elements/attributes for clicking the submit/continue buttons we ran into some code issues. Wondering if there is a way to mimic the enter key feature from the keyboard using the script. We need this for Chrome browser. Below is the script with dummy values:

logData 0

// bring up the login screen
navigate https://www.test.com

logData 1

// log in
setValue name=publicUserId test1234
clickAndWait btn_continue

Your best bet is to use javascript and the execAndWait command (instead of clickAndWait). That way you can get it working locally in a browser console and do your debugging there before submitting.