Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pass through options to drivers, final puzzle piece!

  • Loading branch information...
commit 4c6c5cd4fad5d256ac54544d80421f0c837a2e14 1 parent be6aaa9
@jnicklas jnicklas authored
View
2  Gemfile.lock
@@ -25,9 +25,9 @@ GEM
configuration (>= 0.0.5)
rake (>= 0.8.1)
mime-types (1.16)
+ nokogiri (1.4.2)
nokogiri (1.4.2-java)
weakling (>= 0.0.3)
- nokogiri (1.4.2)
rack (1.2.1)
rack-test (0.5.4)
rack (>= 1.0)
View
5 lib/capybara/driver/celerity_driver.rb
@@ -84,10 +84,11 @@ def select_node
end
- attr_reader :app, :rack_server
+ attr_reader :app, :rack_server, :options
- def initialize(app)
+ def initialize(app, options={})
@app = app
+ @options = options
@rack_server = Capybara::Server.new(@app)
@rack_server.boot if Capybara.run_server
end
View
2  lib/capybara/driver/culerity_driver.rb
@@ -14,7 +14,7 @@ def self.server
def browser
unless @_browser
- @_browser = ::Culerity::RemoteBrowserProxy.new self.class.server, {:browser => :firefox, :log_level => :off}
+ @_browser = ::Culerity::RemoteBrowserProxy.new self.class.server, options
at_exit do
@_browser.close
@_browser.exit
View
4 lib/capybara/driver/selenium_driver.rb
@@ -61,7 +61,7 @@ def tag_name
def visible?
native.displayed? and native.displayed? != "false"
end
-
+
def find(locator)
native.find_elements(:xpath, locator).map { |n| self.class.new(driver, n) }
end
@@ -83,7 +83,7 @@ def type
def browser
unless @browser
- @browser = Selenium::WebDriver.for(options[:browser] || :firefox)
+ @browser = Selenium::WebDriver.for(options.delete(:browser) || :firefox, options)
at_exit do
@browser.quit
end
Please sign in to comment.
Something went wrong with that request. Please try again.