Skip to content

Commit bb2d3c9

Browse files
committed
support enable_downloads=
1 parent 6aa875b commit bb2d3c9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

examples/ruby/lib/monkey_patch.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,23 @@ def add_condition(name, condition = nil, &)
3434
end
3535
end
3636
end
37+
38+
module Selenium
39+
module WebDriver
40+
class Options
41+
def self.set_capabilities
42+
(W3C_OPTIONS + GRID_OPTIONS + self::CAPABILITIES.keys).each do |key|
43+
next if method_defined? key
44+
45+
define_method key do
46+
@options[key]
47+
end
48+
49+
define_method :"#{key}=" do |value|
50+
@options[key] = value
51+
end
52+
end
53+
end
54+
end
55+
end
56+
end

0 commit comments

Comments
 (0)