Module: Selenium::WebDriver::DriverExtensions::HasNetworkInterception Private
- Defined in:
- lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#intercept {|request, continue| ... } ⇒ Object
private
Intercepts requests coming from browser allowing to either pass them through like proxy or provide a stubbed response instead.
Instance Method Details
#intercept {|request, continue| ... } ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Intercepts requests coming from browser allowing to either pass them through like proxy or provide a stubbed response instead.
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb', line 62 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 |