Flash with watir

73 views
Skip to first unread message
Message has been deleted

kiran

unread,
Apr 6, 2009, 2:14:16 PM4/6/09
to Watir General

Hi all,
Is it posible to test flash on the web?
I am using following 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('http://www.geocities.com/paulocaroli/flash/colors.html')
sleep(3)
# call the default methods available in flash
percentage_loaded = browser.flash(:id, "clickcolors").percent_loaded

but i am getting the below erroe.
>ruby flash.rb
C:/ruby/lib/ruby/gems/1.8/gems/flash_watir-1.1.0/lib/flash_watir/
flash.rb:20:in `percent_loaded': Unable to locate element, using :id,
"clickcolors" (Watir::Exception::UnknownObjectException)
from flash.rb:10
>Exit code: 1
Message has been deleted

Chuck van der Linden

unread,
Apr 6, 2009, 4:41:57 PM4/6/09
to Watir General
For FlashWatir support, you'd probably be best off contacting the
developer of flashwatir directly since I don't see that they have a
forum or anything listed on the google code page for it.

Your example below appears to be just a slightly edited version of
their generic example code, Most likely the flash element that you
are trying to access has an ID other than 'clickcolors' which is why
it's not found.

If you dont' understand how identifying page elements and such works,
I'd strongly recommend you work through the watir tutorial (http://
wiki.openqa.org/display/WTR/Tutorial). Without a basic understanding
of what's going on, you won't know what things need to change (like
how objects on the page are identified) in order to experience
anything but failure when you try to utilize sample code in the way
you are.
> >Exit code: 1- Hide quoted text -
>
> - Show quoted text -

Anna Gabutero

unread,
Apr 6, 2009, 9:20:17 PM4/6/09
to watir-...@googlegroups.com
Also, keep in mind that FlashWatir is not a universal solution to
testing Flash. It can only see the functions that the Flash app chooses
to expose to JavaScript. So testing a random app on the web isn't
likely to work; testing an in-house app will require talking to your
developers about exposing the needed functions.

See this link for more info:
http://code.google.com/p/flash-watir/wiki/ExternalInterface

- Anna

In other words, you'll need cooperation from the
> ____________________________________________________________________________________
> Use the link below to report this message as spam.
> https://lavabit.com/apps/teacher?sig=539281&key=2513201441
> ____________________________________________________________________________________

Reply all
Reply to author
Forward
0 new messages