HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 in <Unknown>

45 views
Skip to first unread message

libo

unread,
Dec 20, 2010, 8:02:12 AM12/20/10
to FunFX
HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101
in <Unknown>

Hello everybody, sorry for my poor english.
I want to use the FunFX + Watir to test the Flex WEB applications in
Windows,
and the browser is IE7. But when the flex_app object call some method,
it will
give some error info.

My system info:

WinXP SP3
ruby 1.8.7
watir 1.6.7
funfx 0.2.2

my test sample is :

require 'rubygems'
require 'test/unit'
require 'funfx'
require 'funfx/browser/watir'

class AccordionTest < Test::Unit::TestCase

@ie = Watir::IE.new()
@ie.goto("http://funfx.rubyforge.org/Flex/FlexObjectTest/
FlexObjectTest.html")
@flex = @ie.flex_app("FlexObjectTest","FlexObjectTest")
puts @flex.methods

tree = @flex.tree(:id=>'treeData').open(:item_renderer,"Container
controls")

end

output log:
>ruby accordion_test.rb
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/
watir.rb:25:in `method_missing': unknown property or method
`fireFunFXEvent' (WIN32OLERuntimeError)
HRESULT error code:0x80020006
未知名称。
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/
watir.rb:25:in `fire_event'
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/
element.rb:27:in `fire_event'
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/
element.rb:55:in `flex_invoke'
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/
element.rb:26:in `fire_event'
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/
elements.rb:1087:in `open'
from accordion_test.rb:14
to_yaml_style
before_text
horizontal_list
labels
set_container
bar_chart
.......

i searched in the funfx group and found a method to change the
watir.rb to test this, but
it give the error info :
>ruby accordion_test.rb
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/
watir.rb:41:in `method_missing': execScript (WIN32OLERuntimeError)
OLE error code:80020101 in <Unknown>

HRESULT error code:0x80020009
发生意外。
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/
watir.rb:41:in `exec_script'
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/
watir.rb:23:in `fire_event'
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/
element.rb:27:in `fire_event'
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/
element.rb:55:in `flex_invoke'
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/
element.rb:26:in `fire_event'
from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/
elements.rb:1087:in `open'
from accordion_test.rb:14
typingspeed=
to_yaml_style
present?
......

i checked the watir.rb file, and maybe this

@ole_obj.ie.Document.parentWindow.execScript(js)

execScript method not defined? someone can help me how to resolve this
problem?

liu....@zte.com.cn

unread,
Dec 19, 2010, 10:52:25 PM12/19/10
to fu...@googlegroups.com




HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 in <Unknown>


Hello everybody, sorry for my poor english.
I want to use the FunFX + Watir to test the Flex WEB applications in Windows,
and the browser is IE7. But when the flex_app object call some method, it will
give some error info.

My system info:

WinXP SP3
ruby 1.8.7
watir 1.6.7
funfx 0.2.2

my test sample is :

require 'rubygems'
require 'test/unit'
require 'funfx'
require 'funfx/browser/watir'

class AccordionTest < Test::Unit::TestCase
           
    @ie = Watir::IE.new()
    @ie.goto("http://funfx.rubyforge.org/Flex/FlexObjectTest/FlexObjectTest.html")
    @flex = @ie.flex_app("FlexObjectTest","FlexObjectTest")
    puts @flex.methods

    tree = @flex.tree(:id=>'treeData').open(:item_renderer,"Container controls")
               
end

run with this watir.rb:

output log:
>ruby accordion_test.rb
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25:in `method_missing': unknown property or method `fireFunFXEvent' (WIN32OLERuntimeError)
    HRESULT error code:0x80020006
      未知名称。
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25:in `fire_event'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27:in `fire_event'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55:in `flex_invoke'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26:in `fire_event'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:1087:in `open'
        from accordion_test.rb:14
to_yaml_style
before_text
horizontal_list
labels
set_container
bar_chart
.......

i searched in the funfx group and found a method to change the watir.rb to test this, but
it give the error info :

 run with this watir.rb:


>ruby accordion_test.rb
C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41:in `method_missing': execScript (WIN32OLERuntimeError)
    OLE error code:80020101 in <Unknown>
      鐢变簬鍑虹幇閿欒 80020101 鑰屽鑷存椤规搷浣滄棤娉曞畬鎴愩€?
    HRESULT error code:0x80020009
      发生意外。
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41:in `exec_script'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:23:in `fire_event'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27:in `fire_event'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55:in `flex_invoke'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26:in `fire_event'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:1087:in `open'
        from accordion_test.rb:14
typingspeed=
to_yaml_style
present?
......

i checked the watir.rb file, and maybe this

@ole_obj.ie.Document.parentWindow.execScript(js)

execScript method not defined? someone can help me how to resolve this problem?

--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail is solely property of the sender's organization. This mail communication is confidential. Recipients named above are obligated to maintain secrecy and are not permitted to disclose the contents of this communication to others.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the originator of the message. Any views expressed in this message are those of the individual sender.
This message has been scanned for viruses and Spam by ZTE Anti-Spam system.
watir_bak.rb
watir.rb
Reply all
Reply to author
Forward
0 new messages