Okay.

I got it to work.  I had to comment out '.inspect'.

Thank you for your help.

Joe

On Thu, Oct 6, 2011 at 12:04 PM, Joe Fleck <[email protected]> wrote:

> Hi Željko,
>
> Here is the solution we came up with:
>
> links = $browser.div(:class => 'discussion-meta-wrap').links
>       links.each do |link|
>
>         puts link.text.inspect
>
>         subjectLineDL = link.text.inspect
>
>         puts = "Entering IF statement"
>
>         if subjectLineDL == subjectLineText
>
>           puts "The Actual "+subjectLineDL+ " matches the Expected
> "+subjectLineText+"."
>
>         end
>
>       end
>
>        puts "Loop ended!!"
>
>
> though my if statement isn't working.
>
> Thank you,
> Joe
>
>
> On Thu, Oct 6, 2011 at 10:42 AM, Joe Fleck <[email protected]> wrote:
>
>> Hi Željko,
>>
>> I tried what it but the script just terminates upon the do statement.
>>
>>
>> $browser.div(:class => 'discussion-meta-wrap').lis.each do |element|
>>           #puts $browser.link(:href =>/18/).text
>>           puts element.link(:href => /18/).text
>>
>>           #puts element.span(:class, 'jobSearchJobListedDate').text
>>           puts element.ps[1].text.to_s
>>        end
>>
>> It seems to get to this point {$browser.div(:class =>
>> 'discussion-meta-wrap').lis.each }
>> and terminate.  Can you tell me why that might be happening?  What exactly
>> does 'lis' mean?
>> Is there anyway not to be dependent on the 18 because that value will
>> every time the script runs.
>>
>> Thank you,
>> Joe
>>
>>
>>
>> On Thu, Oct 6, 2011 at 10:19 AM, Željko Filipin <
>> [email protected]> wrote:
>>
>>> On Thu, Oct 6, 2011 at 4:04 PM, Joe Fl <[email protected]> wrote:
>>> > I am looking for this verbiage from
>>> > below 'Watir Test Wed Oct 05 16:07:00 -0400 2011'.
>>>
>>> This worked for me with the HTML you have provided:
>>>
>>> browser.link(:href => /18/).text
>>>
>>> => "Watir Test Wed Oct 05 16:07:00 -0400 2011"
>>>
>>> Željko
>>> --
>>> watir.com - community manager
>>> watir.com/book - author
>>> watirpodcast.com - host
>>>
>>> --
>>> 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]
>>>
>>
>>
>

-- 
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]

Reply via email to