Class: Selenium::WebDriver::Remote::Capabilities
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Remote::Capabilities
- Defined in:
- lib/monkey-patches/webdriver-patches.rb
Instance Method Summary collapse
- #as_json(opts = nil) ⇒ Object
- #custom_capabilities(opts) ⇒ Object
-
#old_as_json ⇒ Object
hopefuly this alias approach will mean we capture changes in the webdriver method.
Instance Method Details
#as_json(opts = nil) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/monkey-patches/webdriver-patches.rb', line 16 def as_json(opts = nil) hash = old_as_json if @custom_capabilities @custom_capabilities.each do |key, value| hash[key] = value end end hash end |
#custom_capabilities(opts) ⇒ Object
10 11 12 |
# File 'lib/monkey-patches/webdriver-patches.rb', line 10 def custom_capabilities(opts) @custom_capabilities = opts end |
#old_as_json ⇒ Object
hopefuly this alias approach will mean we capture changes in the webdriver method
15 |
# File 'lib/monkey-patches/webdriver-patches.rb', line 15 alias_method :old_as_json, :as_json |