yeah i tried with valid html but i think watir1.6.2 is not supporting
iframe.html method,i want to check the magic no of the ads and if we click
on the ad,it should take as to right page..

["If you want to see if the ad functions correctly, maybe loading it into
its own page outside of the iframe is the best solution. Especially if they
are flash"]
i tried this also, but not able to get the src of the ads,it's in iframe
..here is the code ,what i've tried.

def test_ad
    adFrame = ie.frame(:id,/adsonar_serve/)
    #puts '---------'
    #puts adFrame.html
    #puts '---------'

    if adFrame == nil
    verify(adFrame!=nil, 'ad test failed, could not locate ad frame')

    else
    html = adFrame.html

    pos1 = html.index("<BODY")
    pos2 = html.index("</BODY>")

    substring = html[pos1..pos2]

    #puts substring.length

    verify(substring.length > 100, 'ad test failed, could not locate ad on
main page')
    end#end else
  end
end

Yogesh

On Tue, Apr 28, 2009 at 9:08 AM, Paul Rogers <paul.rog...@shaw.ca> wrote:

> so what are you trying to test? The ads show up? the ads function
> correctly? The impression count gets incremented correctly?
>
> If you only want to see if the ad shows up, just check the iframe has some
> valid html
> If you want to see if the ad functions correctly, maybe loading it into its
> own page outside of the iframe is the best solution. Especially if they are
> flash
>
>
> Paul
>
> On Mon, Apr 27, 2009 at 9:25 PM, yogesh khandelwal <
> er.yogeshkhandel...@gmail.com> wrote:
>
>> yeah...ads are in iframe...flash is having embed id..don't know how to
>> deal with that..i installed flash-watir also but not able to get the
>> expected result
>>
>>
>> On Tue, Apr 28, 2009 at 8:28 AM, Paul Rogers <paul.rog...@shaw.ca> wrote:
>>
>>> are the ads:
>>>   images
>>>   flash
>>>   in a div
>>>   in an iframe
>>>
>>> ?
>>>
>>> kind of difficult to help you with this one.
>>>
>>> Paul
>>>
>>>
>>>
>>> On Mon, Apr 27, 2009 at 8:35 PM, yogesh 
>>> <er.yogeshkhandel...@gmail.com>wrote:
>>>
>>>>
>>>> yeah..i read that...sorry for the little information..
>>>>
>>>> I need to check all the advertisement/images present on the page.Do we
>>>> have anything ,any method in watir/ruby by which i can verify this.
>>>> For image loading,we have image.hasloaded?..
>>>>
>>>> On Apr 28, 7:19 am, Anna Gabutero <a...@lavabit.com> wrote:
>>>> > Hi Yogesh,
>>>> >
>>>> > Try reading:http://wiki.openqa.org/display/WTR/Support
>>>> >
>>>> > On Mon, Apr 27, 2009 at 05:52:52AM -0700, yogesh wrote:
>>>> >
>>>> > > I need to check all the ads/images present on the webpage.They all
>>>> are
>>>> > > coming from different locations,need to verify ,all images are
>>>> loading
>>>> > > fine,no 404/302 error, also need to check the magic no is coming
>>>> > > correctly for that image.
>>>> >
>>>> > > you can usehttp://fanhouse.comas a input url.
>>>> >
>>>> > > Thanks,
>>>> >
>>>> > > Yogesh
>>>> >
>>>> > >
>>>> ____________________________________________________________________________________
>>>> > > Use the link below to report this message as spam.
>>>> > >https://lavabit.com/apps/teacher?sig=561613&key=3600820026
>>>> > >
>>>> ____________________________________________________________________________________
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> Thanks,
>> Yogesh Khandelwal
>> AOL Online India Pvt. Ltd.
>> +919886993776
>>
>>
>>
>>
>
> >
>


-- 
Thanks,
Yogesh Khandelwal
AOL Online India Pvt. Ltd.
+919886993776

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to