Module: Selenium::WebDriver::DriverExtensions::HasNetworkConditions Private
Relationships & Source Files | |
Defined in: | rb/lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb |
Instance Attribute Summary
-
#network_conditions ⇒ Hash
rw
Internal use only
Returns network conditions.
-
#network_conditions=(conditions)
rw
Internal use only
Sets network conditions.
Instance Method Summary
-
#delete_network_conditions
Internal use only
Resets Chromium network emulation settings.
Instance Attribute Details
#network_conditions ⇒ Hash
(rw)
Returns network conditions.
# File 'rb/lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb', line 30
def network_conditions @bridge.network_conditions end
#network_conditions=(conditions) (rw)
Sets network conditions
# File 'rb/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
Instance Method Details
#delete_network_conditions
Resets Chromium network emulation settings.
# File 'rb/lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb', line 60
def delete_network_conditions @bridge.delete_network_conditions end