hammernight/taza — pull request #24 by andrewpanin (2014-11-25 00:44:29+00:00)
Title: Add support for optional args in config/config.yml for Watir Webdriver

Hello,

I'm using Taza with RSpec in my project and I faced the need to start PhantomJS via Watir Webdriver with arguments (see http://stackoverflow.com/questions/26583409/watir-webdriver-phantomjs-and-urls-that-redirect-to-https).

I tried to patch Taza::Browser.create_watir_webdriver method, but it seemed to be overwritten later, so I did the following:

*config/config.yml*
```---
driver: watir_webdriver_ext
browser: phantomjs
options:
# See Selenium::WebDriver.for
# :profile: ...
# :port: ...
:args: [--ignore-ssl-errors=true, --ssl-protocol=any, --debug=true]
:port: 8888
```

*spec/support/patch_taza_browser.rb*
```...
def self.create_watir_webdriver_ext(params)
if (not params[:options].nil?) && (not params[:options].empty?) then
Watir::Browser.new params[:browser], params[:options]
else
Watir::Browser.new params[:browser]
end
end
```

Am I reinventing a wheel here? If yes, how could I do that in the other way?