diff --git a/rb/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb b/rb/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb index 1965466633f08..8acadbe0b8519 100644 --- a/rb/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb +++ b/rb/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb @@ -57,6 +57,13 @@ module HasLogEvents # def on_log_event(kind, &block) + if browser == :firefox + WebDriver.logger.deprecate( + 'Driver#on_log_event on Firefox', + 'the script.add_console_message_handler or the script.add_javascript_error_handler methods', + id: :on_log_event + ) + end raise Error::WebDriverError, "Don't know how to handle #{kind} events" unless KINDS.include?(kind) enabled = log_listeners[kind].any? diff --git a/rb/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb b/rb/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb index 3339426157d91..54abcecba87c7 100644 --- a/rb/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb +++ b/rb/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb @@ -60,6 +60,13 @@ module HasNetworkInterception # def intercept(&) + if browser == :firefox + WebDriver.logger.deprecate( + 'Driver#intercept on Firefox', + 'the new bidi.network.add_intercept method', + id: :intercept + ) + end @interceptor ||= DevTools::NetworkInterceptor.new(devtools) @interceptor.intercept(&) end