Try this:

  ENV['watir_browser'] = 'firefox'

Setting Watir::Browser.default in your rake file won't work, because 
Cucumber is running in a separate process.

Bret

aidy lewis wrote:
> Hi,
>
> Has anyone managed to set the browser through Rake?
>
>
> <rake>
> require 'cucumber/rake/task'
> require 'watir'
>
>
> Cucumber::Rake::Task.new("default", "features") do |t|
>   t.cucumber_opts = "-f TeamCityFormatter -f html --out story-results.html"
> end
>
> task :ff do
>   ENV['ENVIRONMENT']='systest'
>   Watir::Browser.default = 'firefox'
>   Rake.application["default"].execute
> end
>
> task :ie do
>   ENV['ENVIRONMENT']='systest'
>   Watir::Browser.default = 'ie'
>   Rake.application["default"].execute
> end
> </rake>
>
> <CI>
> rake ie
> rake ff
> </CI>
>
> As I get the default browser of Firefox, for both of the above commands.
>
> Thanks
>   


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Ask me about Watir training
www.watircraft.com/training


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to