I have a problem creating browser instances for Cucumber drivers. If i create the object on env.rb inside the “Before do” as:
Before do
@browser = Watir::Browser.new 'firefox'
end
…works fine, opening a new browser for each feature and closing it on the “After do”.
That slows the execution because a new browser starts and closes every feature. But if i create the @browser out of the “Before do” in order to have the same browser session for all the features, i have the following error:
**Unable to pick a platform for the provided browser (RuntimeError)**
...launching no test at all. I'm using the page-objects gem, ruby-on-rails...
Can you tell me please what am i doing wrong? Thank you so much!