How to test a website that requires a username and password to log in???

I want to [/size]and jump to a sub-page after successful login, but I don’t know how to write script statements. Can someone help me? Be deeply grateful.

Here’s what I wrote:

setValue name=userName ******
setValue name=password ******
execAndWait $(document.getElementsByClassName(‘pass-button-submit’)[0]).submit()

If setValue doesn’t work, try setting it using JS, its been more reliable in my testing