This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
FunFX and Flex
FunFX is a Watir / SafariWatir / FireWatir extension that lets you talk to an Adobe Flex application straight from Ruby. It works wonderfully with Cucumber. Here is an example to get you started:
# features/support/env.rb
require 'rubygems'
require 'spec'
#require 'funfx/browser/safariwatir'
#BROWSER = Watir::Safari.new
require 'funfx/browser/firewatir'
BROWSER = FireWatir::Firefox.new
#require 'funfx/browser/watir'
#BROWSER = Watir::IE.new
DEMO_APP = "http://localhost:9851/index.html"
Before do
BROWSER.goto(DEMO_APP)
@flex = BROWSER.flex_app('DemoAppId', 'DemoAppName')
end
at_exit do
BROWSER.close
end
# features/step_definitions/date_steps.rb
Given /^I am on the new date page$/ do
tree = @flex.tree({:id => 'objectTree'})
tree.open('Date controls')
tree.select('Date controls>DateField1')
end
When /^I select date (.*)$/ do |date|
date_field = @flex.date_field({:id => 'dateField1'})
date_field.open
date_field.change(date)
end
Then /^I should see (.*) as my date$/ do |date|
date_field = @flex.date_field({:id => 'dateField1'})
date_field.selected_date.to_s.should == Date.parse(date).to_s
end
You can see the full example code in FunFX’ example directory
Ladislav Martincik has written a more general tutorial in his blog that explains how to install FunFX and some basics about the FunFX API.






