Skip to content

Commit 1784307

Browse files
authored
Merge pull request rails#43496 from yahonda/diag43493
Address `Selenium [DEPRECATION] [:browser_options] :options as a parameter for driver initialization is deprecated.`
2 parents 8f6f440 + 7f2b89f commit 1784307

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

actionpack/lib/action_dispatch/system_testing/driver.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def register
5555
end
5656

5757
def browser_options
58-
@options.merge(options: @browser.options).compact
58+
@options.merge(capabilities: @browser.options).compact
5959
end
6060

6161
def register_selenium(app)

actionpack/test/dispatch/system_testing/driver_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class DriverTest < ActiveSupport::TestCase
7979
},
8080
"browserName" => "chrome"
8181
}
82-
assert_equal expected, browser_options[:options].as_json
82+
assert_equal expected, browser_options[:capabilities].as_json
8383
end
8484

8585
test "define extra capabilities using headless_chrome" do
@@ -99,7 +99,7 @@ class DriverTest < ActiveSupport::TestCase
9999
},
100100
"browserName" => "chrome"
101101
}
102-
assert_equal expected, browser_options[:options].as_json
102+
assert_equal expected, browser_options[:capabilities].as_json
103103
end
104104

105105
test "define extra capabilities using firefox" do
@@ -117,7 +117,7 @@ class DriverTest < ActiveSupport::TestCase
117117
},
118118
"browserName" => "firefox"
119119
}
120-
assert_equal expected, browser_options[:options].as_json
120+
assert_equal expected, browser_options[:capabilities].as_json
121121
end
122122

123123
test "define extra capabilities using headless_firefox" do
@@ -135,7 +135,7 @@ class DriverTest < ActiveSupport::TestCase
135135
},
136136
"browserName" => "firefox"
137137
}
138-
assert_equal expected, browser_options[:options].as_json
138+
assert_equal expected, browser_options[:capabilities].as_json
139139
end
140140

141141
test "does not define extra capabilities" do

0 commit comments

Comments
 (0)