Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from selenium import webdriver
2from selenium.webdriver.chrome.options import Options
3from . import Base
6class Chrome(Base):
7 def get_options(self):
8 return Options()
10 def boot_driver(self):
11 self.log.debug("chrome: %s", self.browser_args)
12 return webdriver.Chrome(**self.browser_args)
14 def do_network_conditions(self, params):
15 """
16 - name: network emulation settings
17 network_conditions:
18 latency: 4
19 download_throughput: 2
20 upload_throughput: 1
21 offline: false
22 """
23 prep = self.driver.get_network_conditions()
24 self.log.info("network emulation settings: %s -> %s", prep, params)
25 self.driver.set_network_conditions(**params)