[Wtr-general] looking for span class

2006-11-30 Thread usha
how can I verify if Blah Links exists and how many of them. table cellpadding=0 cellspacing=0 border=0 class=blahLinksMain trtdspan class=blahLinkTitleBlah Links:/span span class=blahLinkHelpa href=/gp/websearch/detail/what-is-this.html/104-8919835-0455142 target=ABCHelp

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, pThis is your second (well, first of 2 to be specific) thread asking essentially the same thing. Hopefully my post in the other thread a href=http://forums.openqa.org/thread.jspa?threadID=5543messageID=15415#15415;here/a was helpful, though this post does shed some light on a new angle

Re: [Wtr-general] looking for span class

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

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