From 9196e5fade5557f4a5911fed19a8b1ec3a95bfa4 Mon Sep 17 00:00:00 2001 From: Adrianna Chang Date: Mon, 11 Nov 2024 12:03:17 -0500 Subject: [PATCH] Ignore URI::RFC3986_PARSER.escape deprecation warning `uri` switched the default parser from RFC2396 to RFC3986. The new parser emits a deprecation warning on a few methods and delegates them to RFC2396. See https://github.com/ruby/uri/pull/114. The selenium-webdriver gem [calls `URI::RFC3986_PARSER.escape`][webdriver-callsite], which is now deprecated. Until this is fixed in selenium-webdriver, ignore the warning. [webdriver-callsite]: https://github.com/SeleniumHQ/selenium/blob/trunk/rb/lib/selenium/webdriver/remote/bridge.rb#L679 --- test/test_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_helper.rb b/test/test_helper.rb index 45b388b2..a079150c 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -48,6 +48,9 @@ module Warning class << self def warn(message) return super if message.start_with?("Rack::Handler is deprecated") + # To be removed once warning is fixed in selenium-webdriver + # This is noisy, so ignoring completely for now. + return if message.match?("URI::RFC3986_PARSER.escape is obsoleted.") raise message.to_s end