Time for an example.
def login_as(username, password)
ie.goto("my.app/login")
ie.should_contain("please login")
ie.text_field(:id, "username").set(username)
ie.text_field(:id, "password").set(password)
ie.button(:value, "login").click
ie.should_contain("logged in as #{username}")
end
You run that test, and you get output like this:
How to login?
- go to page my.app/login
- there should be text "please login"
- enter username at username text field
- enter password at password text field
- click button login
- there should be text "logged in as username"
Has anybody done something like this? I am thinking of doing it, but If somebody has done it already, I would like to take a look.
Zeljko
--
http://zeljkofilipin.com/
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general