[Wtr-general] looking for span class

2006-11-30 Thread usha
how can I verify if "Blah Links" exists and how many of them. Blah Links: What's This? tried ie.span, ie.link - response was false though exists. Thanks in advance - Posted via Jive Forums http://forums.openqa.org/thread.jspa?t

Re: [Wtr-general] looking for span class

2006-11-30 Thread usha
Thanks to you my previous issue is resolved. This one I think is different 'cause 'Blah Links' is not a link but text (of span class)displayed on the page. I'm trying to see if this text exists and how many times it occured in the page. tried these & seeing false ie.span(:id, /list/)

Re: [Wtr-general] looking for span class

2006-11-30 Thread Vince
usha, This is your second (well, first of 2 to be specific) thread asking essentially the same thing. Hopefully my post in the other thread http://forums.openqa.org/thread.jspa?threadID=5543&messageID=15415#15415";>here was helpful, though this post does shed some light on a new angle of your q

Re: [Wtr-general] looking for span class

2006-11-30 Thread Vince
Are you trying to find text, or spans? If you're looking for text, then: search_term = /Blah Links/ ctr = ie.text =~ search_term =~ returns a count of the times the regex matched, so it's perfect for finding instances... If you're looking for the number of spans containing a string, then : ct

Re: [Wtr-general] looking for span class

2006-11-30 Thread usha
absolutely! with minor typos corrected : ctr = 0 search_term = /Blah Links/ ie.spans.each do |s| if s.text =~ search_term ctr = ctr + 1 end end Thank you - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threa