korimo / firewatir

Automatically exported from code.google.com/p/firewatir
0 stars 0 forks source link

close method does not work immediately after ff object is initialized #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using 1.02.

If the close method is called immediately after a Firefox object is created
an exception occurs because the @@current_window variable hasn't been
initialized yet. Things work fine if you use f.goto just once. At that
point, everything's in the proper state and the close method works. 

Steps:
f = Firefox.new
f.close

Result: 

NameError: uninitialized class variable @@current_window in FireWatir::Firefox
        from
c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.0.2/./firewatir.rb:350:in `close'
        from (irb):2:in `breakpoint'
        from c:/ruby/lib/ruby/site_ruby/1.8/breakpoint.rb:563:in `breakpoint'
        from C:/eclipse/workspace/watir/ie/fftest.rb:10
irb(main):003:0>

Original issue reported on code.google.com by jfitis...@gmail.com on 11 May 2007 at 8:03

GoogleCodeExporter commented 9 years ago
Forgot to mention, this is on Windows...

Original comment by jfitis...@gmail.com on 11 May 2007 at 8:34

GoogleCodeExporter commented 9 years ago
Fixed. Needs bit of testing, then will update the SVN

Original comment by ang...@gmail.com on 19 Jun 2007 at 5:17

GoogleCodeExporter commented 9 years ago

Original comment by ang...@gmail.com on 22 Jun 2007 at 10:10

GoogleCodeExporter commented 9 years ago

Original comment by prema.a...@gmail.com on 22 Jun 2007 at 11:33

GoogleCodeExporter commented 9 years ago
I am experiencing a similar (but different cause i believe) bug in FF 2.0.0.9, 
using jssh-darwin-0.94.xpi on 
leopard (OS X 10.5)

if FF has no blank window or after a f.close, scripts hang permanently. Killing 
them yields a trace like (this one 
from running bug_fixes_test):

^C./../container.rb:836:in `read_socket': Interrupt
        from ./../firewatir.rb:556:in `wait'
        from ./../firewatir.rb:258:in `goto'
        from ./unittests/bug_fixes_test.rb:9:in `setup'
        from /opt/local/lib/ruby/1.8/test/unit/testcase.rb:77:in `run'
        from /opt/local/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
        from /opt/local/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'
        from /opt/local/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
        from /opt/local/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
         ... 6 levels...
        from /opt/local/lib/ruby/1.8/test/unit/autorunner.rb:216:in `run'
        from /opt/local/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run'
        from /opt/local/lib/ruby/1.8/test/unit.rb:278

Original comment by lastobe...@gmail.com on 15 Nov 2007 at 5:57

GoogleCodeExporter commented 9 years ago
Can you provide with a sample script?

Original comment by ang...@gmail.com on 15 Nov 2007 at 6:00