Re: [wtr-general] I need to retrieve multiple span class=discussion-title

2011-11-07 Thread Joe Fleck
No worries, here is what I got when I ran the code: ree-1.8.7-2010.02 :024 section_headers = $browser.div(:class,mod simple your-subscriptions).div(:class,bd).ul(:class,items).lis = #Watir::LICollection:0x1044bf000 @parent=#Watir::UList:0x1044bf0f0 located=false selector={:class=items,

Re: [wtr-general] I need to retrieve multiple span class=discussion-title

2011-11-07 Thread Michael
That appears to be because your first LI doesn't have a H2 inside of it. When you put one LI after another, the browser will automatically close the first before the second opens. ul class=items li class=item subscriptions-description li class=item digest-options h2Digest Options/h2 Fix

Re: [wtr-general] I need to retrieve multiple span class=discussion-title

2011-11-07 Thread Joe Fleck
So, I won't be able to retrieve those headers because the first one has a p in it. Why is it when I try to get the li class name it returns? ree-1.8.7-2010.02 :041 section_headers.each do|sec_hdr| ree-1.8.7-2010.02 :042 puts hdr = sec_hdr.class ree-1.8.7-2010.02 :043? end Watir::LI

Re: [wtr-general] I need to retrieve multiple span class=discussion-title

2011-11-07 Thread Joe Fleck
Okay, I just the answer that works in getting the class name. .attribute_value('*class*') Here is my code: section_headers.each do|sec_hdr| puts hdr = sec_hdr.attribute_value('class') if hdr == 'item digest-options' puts hdr_1 = $browser.li(:class,'item digest-options').h2.text

Re: [wtr-general] I need to retrieve multiple span class=discussion-title

2011-11-07 Thread Jari Bakken
On Mon, Nov 7, 2011 at 3:41 PM, Joe Fleck joeflec...@gmail.com wrote: Okay, I just the answer that works in getting the class name. .attribute_value('*class*') .class_name would work as well. -- Before posting, please read http://watir.com/support. In short: search before you ask, be

Re: [wtr-general] I need to retrieve multiple span class=discussion-title

2011-11-06 Thread Michael
You probably intended to use uls which will return a list of ul's instead of ul which only returns the first matching ul. Try: My Code:section_headers = $browser.div(:class,bd).uls(:class,items) Michael On 2011-Nov-06, at 7:09 PM, Joe Fleck wrote: Hi Chuck, I am still having a bit of

Re: [wtr-general] I need to retrieve multiple span class=discussion-title

2011-11-06 Thread Michael
A second looks at your code made me think you should be using ul (singular because you only have one), and append lis on the end to get all the li's contained within the ul. My Code:section_headers = $browser.div(:class,bd).ul(:class,items).lis Sorry about the first response, please

[wtr-general] I need to retrieve multiple span class=discussion-title

2011-10-21 Thread Joe Fl
Hi, I need to retrieve multiple discusion titles from a page. I just want the titles only and there can be 5 to 13 on a page with other links listed under them. I have tried the following and it will only return the first discussion title or all links: subject_lines =