hi all
I'm using selenium-client with selenium rspec. I'm trying to build a
helper method that will, given this html on the page...
<div id="flashes">
<p id="flash_notice" class="messages notice">good things</p>
<p id="flash_errors" class="messages errors">bad things</p>
<p id="flash_help" class="messages help">helpful things</p>
</div>
...generate this hash:
{:notice => "good things", :errors => "bad things", :help => "helpful
things"}
Ideally i'd like to keep it flexible so i don't have to tell it to
specifically look for notice, errors and help, but just pull out
whatever's there in the flashes div.
I've been trying to do this using xpath selectors but am struggling
because, for example,
@browser.get_attribute("//d...@id='flashes']/p...@id")
just returns the first p tag's id, rather than an array of ids for
example. I get the feeling that i'm missing something fundamental.
grateful for any advice - max
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en.