Defect #37884
closedAll system tests fail on 4.2-stable branch with "ArgumentError: unknown keyword: :desired_capabilities"
0%
Description
I am trying system test on GitHub Actions CI, but I noticed that all system tests failed on "4.2-stable" branch.
https://github.com/sanak/redmine_text_blocks/actions/runs/3382111397/jobs/5616692628#step:13:25
Error:
IssuesSystemTest#test_update_journal_notes_with_preview:
ArgumentError: unknown keyword: :desired_capabilities
test/application_system_test_case.rb:74:in `log_user'
test/system/issues_test.rb:492:in `test_update_journal_notes_with_preview'
Error:
IssuesSystemTest#test_update_journal_notes_with_preview:
ArgumentError: unknown keyword: :desired_capabilities
/usr/local/bundle/gems/selenium-webdriver-4.5.0/lib/selenium/webdriver/common/driver.rb:319:in `create_bridge'
/usr/local/bundle/gems/selenium-webdriver-4.5.0/lib/selenium/webdriver/common/driver.rb:74:in `initialize'
/usr/local/bundle/gems/selenium-webdriver-4.5.0/lib/selenium/webdriver/common/driver.rb:47:in `new'
/usr/local/bundle/gems/selenium-webdriver-4.5.0/lib/selenium/webdriver/common/driver.rb:47:in `for'
/usr/local/bundle/gems/selenium-webdriver-4.5.0/lib/selenium/webdriver.rb:89:in `for'
/usr/local/bundle/gems/capybara-3.31.0/lib/capybara/selenium/driver.rb:51:in `browser'
:
Finished in 1.521672s, 34.1729 runs/s, 0.6572 assertions/s.
52 runs, 1 assertions, 0 failures, 52 errors, 0 skips
The same system test on "5.0-stable" branch was no problem about the error, even if a few tests failed.
https://github.com/sanak/redmine_text_blocks/actions/runs/3382111397/jobs/5616693089
:
Finished in 113.501929s, 0.5198 runs/s, 2.7048 assertions/s.
59 runs, 307 assertions, 3 failures, 3 errors, 0 skips
Files
Updated by Ko Nagase about 2 years ago
From comparing Gemfile difference,
"master(trunk)" and "5.0-stable" branch limits "selenium-webdriver" version ("~> 3.142.7"),
https://github.com/redmine/redmine/blob/master/Gemfile#L103-L104
https://github.com/redmine/redmine/blob/5.0-stable/Gemfile#L103-L104
gem "selenium-webdriver", "~> 3.142.7"
gem 'webdrivers', '4.6.1', require: false
but "4.2-stable" branch doesn't limit "selenium-webdriver" version, and therefor higher 4.5.0 version is installed.
https://github.com/redmine/redmine/blob/4.2-stable/Gemfile#L103-L104
gem "selenium-webdriver"
gem 'webdrivers', '~> 4.4', require: false
From the "selenium-webdriver" GitHub repository's change log, "desired_capabilities" seems to be removed from 4.3.0,
- https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES#L52
Remove deprecated support for `:desired_capabilities` & `:options` with `Hash` argument
so it may be better to limit "selenium-webdriver" version with the same condition ("~> 3.142.7") as "master(trunk)" and "5.0-stable" branches.
Updated by Ko Nagase about 2 years ago
- File 001-limit-selenium-webdriver-for-4_2-stable.patch 001-limit-selenium-webdriver-for-4_2-stable.patch added
With the attachment patch "001-limit-selenium-webdriver-for-4_2-stable.patch" for "4.2-stable" branch, I confirmed that the "desired_capabilities" errors were solved.
https://github.com/sanak/redmine_text_blocks/actions/runs/3383207631/jobs/5618896942#step:13:118
Updated by Ko Nagase about 2 years ago
- File 001-limit-selenium-webdriver-for-4_2-stable-2.patch 001-limit-selenium-webdriver-for-4_2-stable-2.patch added
Sorry, I missed that "master(trunk)" and "5.0-stable" branches are using double quotes for "selenium-webdriver", so I reverted the quote type with this attachment file.
Updated by Go MAEDA about 2 years ago
- Subject changed from All system tests failed on 4.2-stable branch with "ArgumentError: unknown keyword: :desired_capabilities" to All system tests fail on 4.2-stable branch with "ArgumentError: unknown keyword: :desired_capabilities"
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Target version set to 4.2.9
- Resolution set to Fixed
Fixed the issue by merging r21256 into 4.2-stable. Thank you for reporting the issue.
Updated by Ko Nagase about 2 years ago
Go MAEDA wrote:
Fixed the issue by merging r21256 into 4.2-stable. Thank you for reporting the issue.
Okay, thanks!
Updated by Marco Ferretti about 2 years ago
Hi,
just updated 4.2-stable and have an issue with selenium webdriver:
bundle update [DEPRECATED] Your Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. [...] Fetching gem metadata from http://rubygems.org/.......... Fetching gem metadata from https://rubygems.org/.......... Fetching gem metadata from http://rubygems.org/.. Fetching gem metadata from https://rubygems.org/.. Could not find gem 'selenium-webdriver (~> 3.142.7) x86_64-linux' in rubygems repository http://rubygems.org/, https://rubygems.org/ or installed locally. The source contains the following gems matching 'selenium-webdriver (~> 3.142.7)': * selenium-webdriver-3.142.7
I tried manual install of selenium-webdriver-3.142.7 :
gem install selenium-webdriver -v 3.142.7 Fetching childprocess-3.0.0.gem Fetching selenium-webdriver-3.142.7.gem Successfully installed childprocess-3.0.0 Successfully installed selenium-webdriver-3.142.7 2 gems installed
then re-run the update, same issue.
Updated by Ko Nagase about 2 years ago
Marco Ferretti wrote:
Hi,
just updated 4.2-stable and have an issue with selenium webdriver:
[...]I tried manual install of selenium-webdriver-3.142.7 :
[...]
then re-run the update, same issue.
Hi Marco,
What is your local environment details ?
- redmine: 4.2-stable branch
- OS/ruby version:
- M1 Mac (Monterey)/2.6
- Ubuntu 22.04 (on GitHub Actions)/2.6, 2.7
Also, when reverting Gemfile locally, which version of selenium-driver is installed ?
--- Gemfile
+++ Gemfile
@@ -100,7 +100,7 @@ group :test do
# TODO: Remove version specification once Capybara supports Puma 6
gem 'puma', '< 6.0.0'
gem 'capybara', '~> 3.31.0'
- gem "selenium-webdriver", "~> 3.142.7"
+ gem "selenium-webdriver"
gem 'webdrivers', '~> 4.4', require: false
# RuboCop
gem 'rubocop', '~> 1.12.0'
Updated by Marco Ferretti about 2 years ago
I just emptied the config and it now works updates. I had
--- BUNDLE_WITHOUT: "development:test"
pretty odd ...
Updated by Ko Nagase about 2 years ago
Marco Ferretti wrote:
I just emptied the config and it now works updates. I had
[...]pretty odd ...
Okay, nice to hear about that.
Thanks for comment!