网络仿真设置(set_network_conditions)

from selenium import webdriver

driver = webdriver.Chrome(executable_path=MAC_DRIVER_PATH, options=chrome_options)
driver.set_network_conditions(offline=False,latency=1000,throughput=500 * 1024)

参数设置


Note: ‘throughput’ can be used to set both (for download and upload).