[wtr-general] how do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh

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 use http://fanhouse.com as a input url.



Thanks,

Yogesh

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



[wtr-general] Re: how do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh

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



[wtr-general] Re: about the flash watir example code

2009-04-27 Thread yogesh

i don't have object tag in my flash,i've embed that like

http://www.aolcdn.com/sportsdata/miniscorecard/flash/miniad/
microminiscoreboard.swf?random=1240894014240" id="miniscoreboard.swf"/
>

i tried by id but not able to click on the flash.

Thanks,
Yogesh

On Apr 16, 9:43 pm, Chuck van der Linden  wrote:
> oh indeed..  I was jumping to an unwarranted conclusion based on some
> prior user's issues with this same sample code.
>
> looks like you are properly identifying the flash object..
>
> not sure why the click method would not be defined.  I've seen that in
> some instances where the browser object has gone away, but given what
> I see if your code that doesn't seem likely.
>
> I think you might need to seek assistance directly with the folks
> developing flashwatir..
>
> On Apr 15, 6:07 pm, Fish  wrote:
>
> > hi linden, thank you for your help, but it doesn't work, I think the
> > id means
>
> >  > codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/
> > swflash.cab#version=8,0,0,0" width="100" height="100" id="clickcolors"
> > align="middle">
>
> > you can find from the console output that the "percentage_loaded " is
> > 100, so I think the watir have recognized the flash object.
>
> > my current question is about this error:
> > D:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
> > flash.rb:91:in
> > `execute': Unable to execute the method on flash document
> > ['clickcolors'].click()
> > ; (NoMethodError)
>
> > very appreciate your help
> > On Apr 16, 4:11 am, Chuck van der Linden  wrote:
>
> > > this doesn't require flash experience.  you just need to understand
> > > the basics of how watir identifies objects..  the code is telling it
> > > to look for an object with the id value of 'clickcolors' which was
> > > just an example ID in the code.  The error is telling you that there's
> > > nothing on the page with that ID
>
> > > to make that code work you are likely to have to modify it a bit,
> > > starting with figuring out how to identify the flash element you are
> > > trying to interact with, and changing the code accordingly.
>
> > > Use the IE developer toolbar to examine the page and figure out a good
> > > way to identify the embedded flash.
>
> > > Unless I'm misreading the page, you should find that for the page you
> > > gave, you'll need to use :name  and 'coloredSquare'
>
> > > Since flashwatir is built on watir, I STRONGLY recommend you go
> > > through the tutorials for Watir, that will teach you the basics of the
> > > tool, before you start trying to work with not only a html page, but
> > > one with flash on it.
>
> > > On Apr 15, 3:41 am, Fish  wrote:
>
> > > > Hi, I just go through the google code of watir flash and try to use
> > > > the example code.
> > > > when I use the URL 
> > > > ofhttp://www.geocities.com/paulocaroli/flash/colors.html
> > > > the error says can not find the id with "clickcolors"
> > > > after that I use the 'file:///E:/ruby/flash/changingcolors/
> > > > changingcolors/colors.html'
> > > > the error says
>
> > > > D:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
> > > > flash.rb:91:in
> > > > `execute': Unable to execute the method on flash document
> > > > ['clickcolors'].click()
> > > > ; (NoMethodError)
>
> > > > the example code:
>
> > > > # include the controller
> > > > require 'flash_watir'
> > > > include FireWatir
> > > > # create an instance of the controller
> > > > browser = Firefox.new
> > > > # go to the flash page you want to test
> > > > browser.goto('file:///E:/ruby/flash/changingcolors/changingcolors/
> > > > colors.html')
> > > > # call the default methods available in flash
>
> > > > percentage_loaded = browser.flash(:id, "clickcolors").percent_loaded
> > > > puts percentage_loaded
> > > > # call the methods you have exposed on the flash application
> > > > browser.flash(:id, "clickcolors").click
> > > > rectangle_color = browser.flash(:id, "clickcolors").getColor
> > > > puts rectangle_color
>
> > > > ==
> > > > th

[wtr-general] Re: how do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh khandelwal
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  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 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  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

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



[wtr-general] Re: how do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh khandelwal
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("")

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



[wtr-general] Re: how do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh khandelwal
how do i get the url of the iframe? if you can tell me how we can get the
url than i can parse it using net/htpp.

Also for flash,.click() method doesnot work.

Thanks,
Yogesh

On Tue, Apr 28, 2009 at 9:29 AM, Paul Rogers  wrote:

> if the iframes are in different domains you will struggle to access the
> contents of the iframe. Its a secrity thing in the browser.
> Can you get the main page with net/http and then parse that for the urls of
> the iframes and then open these individually in watir?
>
> Paul
>
>
> On Mon, Apr 27, 2009 at 9:46 PM, yogesh khandelwal <
> er.yogeshkhandel...@gmail.com> wrote:
>
>> 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(">     pos2 = html.index("")
>>
>> 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  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 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 >>>> > 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  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
>>
>>
>>
>
> >
>


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



[wtr-general] Re: how do i check ads/images present on the web page and loading fine

2009-04-27 Thread yogesh khandelwal
okie..i'll try.

Do we still have ie.frame.html method with watir1.6.2 or it's removed?

Thanks for your help

Thanks,
Yogesh

On Tue, Apr 28, 2009 at 9:44 AM, Paul Rogers  wrote:

> you'll have to get the top level url using net/http and parse that. I dont
> think you'll do it easily with watir other wise
>
> Paul
>
>
> On Mon, Apr 27, 2009 at 10:11 PM, yogesh khandelwal <
> er.yogeshkhandel...@gmail.com> wrote:
>
>> how do i get the url of the iframe? if you can tell me how we can get the
>> url than i can parse it using net/htpp.
>>
>> Also for flash,.click() method doesnot work.
>>
>> Thanks,
>> Yogesh
>>
>>
>> On Tue, Apr 28, 2009 at 9:29 AM, Paul Rogers  wrote:
>>
>>> if the iframes are in different domains you will struggle to access the
>>> contents of the iframe. Its a secrity thing in the browser.
>>> Can you get the main page with net/http and then parse that for the urls
>>> of the iframes and then open these individually in watir?
>>>
>>> Paul
>>>
>>>
>>> On Mon, Apr 27, 2009 at 9:46 PM, yogesh khandelwal <
>>> er.yogeshkhandel...@gmail.com> wrote:
>>>
>>>> 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(">>> pos2 = html.index("")
>>>>
>>>> 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 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 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:
>>>>>>>
>>>>>>>>
>>>>>>>&g