[ http://jira.openqa.org/browse/WTR-285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Charley Baker updated WTR-285: ------------------------------ Fix Version/s: (was: 1.6.7) Soon > FireWatir doesn't work on JRuby [patch] > --------------------------------------- > > Key: WTR-285 > URL: http://jira.openqa.org/browse/WTR-285 > Project: Watir > Issue Type: Improvement > Components: FireWatir > Affects Versions: 1.6.2 > Environment: JRuby > Reporter: Mike Andrzejewski > Priority: Blocker > Fix For: Soon > > Attachments: firewatir_jruby.patch > > > On JRuby, browser's binary detection according to platform does'nt work. > Here is a patch to lib/firewatir/firefox.rb to support JRuby on any platform : > --- gems/firewatir-1.6.2/lib/firewatir/firefox.rb 2009-02-05 > 12:26:00.000000000 +0100 > +++ gems/firewatir-1.6.2/lib/firewatir/firefox.rb 2009-02-05 > 14:33:42.000000000 +0100 > @@ -133,8 +133,12 @@ > > waitTime = options[:waitTime] || 2 > > - case RUBY_PLATFORM > - when /mswin/ > + platform = RUBY_PLATFORM > + if platform.start_with?("java") > + platform = java.lang.System.getProperty("os.name") > + end > + case platform > + when /mswin|windows/i > # Get the path to Firefox.exe using Registry. > require 'win32/registry.rb' > path_to_bin = "" > @@ -150,10 +154,8 @@ > > when /linux/i > path_to_bin = `which firefox`.strip > - when /darwin/i > + when /darwin|mac os/i > path_to_bin = '/Applications/Firefox.app/Contents/MacOS/firefox' > - when /java/ > - raise "Not implemented: Create a browser finder in JRuby" > end > @t = Thread.new { system("#{path_to_bin} -jssh #{profile_opt}")} > sleep waitTime -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.openqa.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ Wtr-development mailing list Wtr-development@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development