Thanks, Richard, for your solution. I came up with a similar
workaround:
system(echo 'tell application \Firefox\ to quit' | osascript -)
But I would need a little more code around it to make sure it only
runs when the tests are executed on a mac.
Matthias
On 2 Dez., 20:36, Richard Lawrence
Hi Bret,
thanks for investigating. Here are some scenarios on my box using irb:
A) firefox already running
irb(main):001:0 require 'rubygems'
= true
irb(main):002:0 require 'firewatir'
= true
irb(main):003:0 b = Watir::Browser.new
TypeError: exception class/object expected
from
Matthias,
Thanks for the details. Would you mind logging this -- and Richard's
workaround -- in Jira so that we can be sure to get it fixed?
Bret
Matthias Marschall wrote:
Hi Bret,
thanks for investigating. Here are some scenarios on my box using irb:
A) firefox already running
Filed under http://jira.seleniumhq.org/browse/WTR-272
Matthias
On 3 Dez., 16:33, Bret Pettichord [EMAIL PROTECTED] wrote:
Matthias,
Thanks for the details. Would you mind logging this -- and Richard's
workaround -- in Jira so that we can be sure to get it fixed?
Bret
Matthias Marschall
Short answer: no.
Dave Hoover says this is browser.quit in SafariWatir. Similar is
IE.close_all. We need to figure out what to do to be consistent.
Regardless, this problem should not be causing your scripts not to
return. Can you provide more information? Something else may be happening.
I use appscript to quit Firefox like this:
in browserfactory.rb
---
require 'firewatir'
require 'appscript'
class BrowserFactory
def get_new_browser
# close Firefox if it's running
if Appscript.app('System Events').processes['Firefox'].exists()
Appscript.app('Firefox').quit