Module: Selenium::WebDriver::DriverExtensions::HasNetworkConditions Private
- Defined in:
- lib/selenium/webdriver/common/driver_extensions/has_network_conditions.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
-
#delete_network_conditions ⇒ Object
private
Resets Chromium network emulation settings.
-
#network_conditions ⇒ Hash
private
Returns network conditions.
-
#network_conditions=(conditions) ⇒ Object
private
Sets network conditions.
Instance Method Details
#delete_network_conditions ⇒ 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.
Resets Chromium network emulation settings.
60 61 62 |
# File 'lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb', line 60 def delete_network_conditions @bridge.delete_network_conditions end |
#network_conditions ⇒ Hash
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.
Returns network conditions.
30 31 32 |
# File 'lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb', line 30 def network_conditions @bridge.network_conditions end |
#network_conditions=(conditions) ⇒ 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.
Sets network conditions
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb', line 45 def network_conditions=(conditions) conditions[:latency] ||= 0 unless conditions.key?(:throughput) conditions[:download_throughput] ||= -1 conditions[:upload_throughput] ||= -1 end conditions[:offline] = false unless conditions.key?(:offline) @bridge.network_conditions = conditions end |