Hi, guys!
I have a problem with identifying proper steps to setup network delay (throttling) through the browser opening. I’ve already investigated that solution for my problem exists, but I need additional review/assist from the experts to apply it properly. I feel that final implementation will be very suitable to all, who needs to test their project on slow internet. So, the direct solution is here - selenium.webdriver.chromium.webdriver — Selenium 4.25.0 documentation
def set_network_conditions(self, **network_conditions)
Before writing the request I did “homework” and all my tries lead to errors like to:
- No keyword with name ‘Set Network Conditions’ found
- Evaluating expression ‘sys.modules[‘selenium.webdriver’].set_network_conditions(offline=True, latency=100, download_throughput=512, upload_throughput=256)’ failed: AttributeError: module ‘selenium.webdriver’ has no attribute ‘set_network_conditions’
- InvalidArgumentException: Message: invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: unrecognized chrome option: setNetworkConditions
- Options object does not have method ‘set_network_conditions’
- Or browser was opened, but set params were ignored
So, if somebody already faced with such or similar problem or has some ideas how to avoid it - please assist. I’ll be very grateful for any comments! Thanks!