[wtr-general] Intermittent Watir issue with Firefox

2011-02-03 Thread Stephen Mc Gowan
Hi,

I'm seeing an intermittent watir issue with firefox. I really don't know
whats causing it, I can't seem to cause it to happen reliably. I've seen a
thread from last may discussing something similar and a really hacky work
around:http://osdir.com/ml/watir-general/2010-05/msg00134.html

I guess I'm hoping some better solution might have popped up in the
meantime.

It's giving me the following error.


C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket.rb:19:in
`js_eval': this.docShell is null (JsshSocket::JSTypeError)

C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/firefox.rb:194:in
`set_browser_document'

C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/firefox.rb:52:in
`initialize'

C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/watir/browser.rb:65:in
`new'

C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/watir/browser.rb:65:in
`new'
from ./Ruby/goto.rb:7

and goto.rb is here:

require rubygems
require watir

puts('ruby: Using firefox')
Watir::Browser.default = 'firefox'
puts('ruby: Starting browser')

b = Watir::Browser.new
puts('ruby: Browser started')
b.maximize
b.goto(ARGV[0])


Any ideas?

Cheers,
-- 
Stephen Mc Gowan.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Problem with firewatir hanging on close

2011-01-12 Thread Stephen Mc Gowan
Hi,

I've been seeing a very sporadic issue with closing a firefox instance
with firewatir 1.6.7.

I'm running the following code to attach to an existing window and
close it:

require rubygems
require watir

Watir::Browser.default = 'firefox'
puts('ruby: attaching to browser')
b = Watir::Browser.attach(:title, /.*/);
puts('ruby: closing browser')
b.close
puts('ruby: browser closed')

Rarely, maybe 1 in 15 times this hangs and I don't get the ruby:
browser closed line printed to standard out. When I hit CTRL-C I get
the following trace.

C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/
jssh_socket.rb:63:in 'recv': Interrupt
from C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/
jssh_socket.rb:63:in 'read_socket'
from C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/
jssh_socket.rb:54:in 'each'
from C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/
jssh_socket.rb:63:in 'read_socket'
from C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/
jssh_socket.rb:63:in 'js_eval'
from C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/
firefox.rb:220:in 'close'
from ./Ruby/close.rb:8

I've seen this across a number of Windows 7 systems, all 3.6.*
versions of Firefox, all systems only had one instance fo Firefox open
with one tab open two. Although I say I've seen this happen 1 in 15
times, I've also managed to run 100 tests in a row that do the same
thing and have no problem. This is really starting to annoy me now.
Anyone have any suggestions?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com