2011/6/10 Pete Emerson <[email protected]>:
> Ah, I misspoke, I meant that I could run my application and then do
> functional testing (with something like twill, mentioned above). But I
> didn't know about this library built in. That's a win in my opinion
> since it's tied in to the framework; sometimes I feel like I've found
> something that might be useful only to discover that it isn't being
> actively maintained anymore, which can sometimes make finding help in
> a pinch rather difficult.
Here is some sample code using browser.
b = app.browser()
b.open("/account/login")
b.select_form("login)
b["username"] = "foo"
b["password"] = "secret"
b.submit()
assert "Welcome Foo" in b.data
assert b.path = "/"
b.follow_link(name="Preferences")
assert b.path == "/account/preferences"
I'll try to add a tutorial or a cookbook example soon.
Anand
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.