Coverage for selenible/drivers/chrome.py: 54%

13 statements  

« prev     ^ index     » next       coverage.py v7.16.0, created at 2026-09-05 14:24 +0000

1from selenium import webdriver 

2from selenium.webdriver.chrome.options import Options 

3 

4from . import Base 

5 

6 

7class Chrome(Base): 

8 def get_options(self): 

9 return Options() 

10 

11 def boot_driver(self): 

12 self.log.debug("chrome: %s", self.browser_args) 

13 return webdriver.Chrome(**self.browser_args) 

14 

15 def do_network_conditions(self, params): 

16 """ 

17 - name: network emulation settings 

18 network_conditions: 

19 latency: 4 

20 download_throughput: 2 

21 upload_throughput: 1 

22 offline: false 

23 """ 

24 prep = self.driver.get_network_conditions() 

25 self.log.info("network emulation settings: %s -> %s", prep, params) 

26 self.driver.set_network_conditions(**params)