Hi guys,
I have the following code code on my page I wanna check:
<p class="tags-link">
<a href="/search?q=test1" rel="nofollow">test1</a>
<a href="/search?q=test2" rel="nofollow">test2</a>
<a href="/search?q=test3" rel="nofollow">test3</a>
</p>
....
<p class="tags-link">
<a href="/search?q=test4" rel="nofollow">test4</a>
<a href="/search?q=test5" rel="nofollow">test5</a>
<a href="/search?q=test6" rel="nofollow">test6</a>
</p>
....
I use Watir-webdriver and page-object. And I need to get all links related
to block with "tags-link" class
I have the following code:
element(:tags, :p, :css => "tags-link a")
tags_element returns the 1st link only
Now I have the following code that works, but I wanna be "page-object"
oriented :
@browser.elements(:css =>".tags-link a").each do |tag|
puts tag
end
Could you please help me...how can I use
element(:tags, :p, :css => "tags-link a")
to get all links on the page using :css => "tags-link a" identifier ?
Thanks,
Anna
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.