[rspec-users] simple story, extract link
Jonathan Linowes
jonathan at parkerhill.com
Tue Sep 25 17:51:20 EDT 2007
hi,
I just started fooling around with story runner, thought I'd start
with a dead simple scenario:
The first thing I do when describing a site to someone is go to the
home page, and begin exploring public pages from there.
So, that seems like a good first story to spec out.
And I'd really like to extract the actual link from the rendered page
(rather than just "assuming" in the spec), but I'm not sure how to do
that
Something like:
# alink = find tag 'div#home-banner-links a ' where
content=="About"
# url = extract the href attribute from alink
get url
Here's the story so far: http://pastie.caboo.se/100810
I'd appreciate suggestions as this seems like something I'd like to
do alot. Thanks
linoj
More information about the rspec-users
mailing list