DOCUMENT_VAR in FireWatir

6 views
Skip to first unread message

Gary

unread,
May 24, 2010, 12:18:56 PM5/24/10
to FunFX

Short Story.

I'm getting an error using FireWatir. I've tracked it down to
DOCUMENT_VAR not be declared in fire_event() in firewatir.rb I've
done a grep of the project for DOCUMENT_VAR and on't found anything.

Here is the code giving me problems.

def fire_event(flex_locator, event_name, args) # :nodoc:
javascript = %|
#{DOCUMENT_VAR}.getElementById("#{@dom_id}").fireFunFXEvent(#{flex_locator},
#{event_name.inspect}, "#{args}");\n|
$jssh_socket.send(javascript, 0)
read_socket
end


I'm not familiar enough with JS to know what DOCUMENT_VAR should be or
how it would be obtained. Will anyone enlighten me?

-Gary

--
You received this message because you are subscribed to the Google Groups "FunFX" group.
To post to this group, send email to fu...@googlegroups.com.
To unsubscribe from this group, send email to funfx+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/funfx?hl=en.

Franco

unread,
Jul 20, 2010, 4:08:12 PM7/20/10
to FunFX
I have the same problem!

This is the shell
~/dev/projects/myFunFx$ ruby myfunfx.rb
/var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/
dependencies.rb:105:in `const_missing': uninitialized constant
FireWatir::Firefox::FlexApp::DOCUMENT_VAR (NameError)
from /var/lib/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/
firewatir.rb:39:in `fire_event'
from /var/lib/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/events.rb:
77:in `fire_event'
from /var/lib/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:
45:in `flex_invoke'
from /var/lib/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:
43:in `loop'
from /var/lib/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:
43:in `flex_invoke'
from /var/lib/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/events.rb:
76:in `fire_event'
from /var/lib/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/events.rb:
10:in `open'
from myfunfx.rb:11

This is myfunfx.rb file

require 'rubygems'
require 'funfx/browser/firewatir'

browser = FireWatir::Firefox.new
browser.goto("http://funfx.rubyforge.org/Flex/FlexObjectTest/
FlexObjectTest.html") # The URL containing your Flex app
flex = browser.flex_app('FlexObjectTest', 'FlexObjectTest') # See the
API for FunFX::Browser::FlexAppLookup#flex_app for details
flex.tree("objectTree").open(:item_renderer => "Button controls")
Reply all
Reply to author
Forward
0 new messages