My favorites | Sign in
Project Logo
                
Search
for
Updated Dec 15, 2008 by saidesertrose2004
Labels: Featured, Phase-Deploy, Phase-Implementation
UserGuide  
UserGuide for FlashWatir.

Introduction

FlashWatir is an extension of watir for testing flash applications in firefox. FlashWatir has been built on firewatir and so can work only on firefox as of now. The work on IE is going on and may be available after sometime.

Installation

The instructions to install ruby must be available in the website. Once you install check the installation by typing > ruby -v in the command line which should give the version number of ruby.
From command line: > gem install watir.
  • To Install flashwatir:
Best way to install is to use the gem. You can download the gem from download section of this project
From your command line: > gem install flash_watir

When writing script using FlashWatir, use require statement to import FlashWatir but when including the module you still need to use FireWatir.

Testability of Flash

FlashWatir works with flash using javascript. Any function you need to call in flash either to change something or to get some values needs to get exposed as ExternalInterface.

// functions available for JavaSript call
ExternalInterface.addCallback("getColor", getColor);
ExternalInterface.addCallback("click", changeColor);
ExternalInterface.addCallback("getSquareLabel", getSquareLabel);
ExternalInterface.addCallback("setSquareLabel", setSquareLabel);

The default methods like play(), percantage loaded, etc. can be called directly on flash. For more info about these methods please refer the flash.rb file in the source.


Comment by TCBlues, Nov 02, 2009

Is necessary to install anything on the flex application? I mean, like in FunFX for example... Adobe Flex Automation Libraries


Sign in to add a comment
Hosted by Google Code