My cpu usage is on average 17% with peaks of 22% when running this selenium script. Is this normal? I have a 5 5600g processor and am not running anything in the background. Thanks in advance.
Button = driver.find_elements(By.CLASS_NAME, "button")
while not (driver.find_elements(By.CLASS_NAME, "button")):
time.sleep(1)
driver.refresh()
Button[0].click()
CodePudding user response:
Officially there is no benchmarking about CPU usage while executing test using Selenium.
Hence, I won't be suprised with CPU usage on average as 17% with peaks of 22% even with 5 5600g processor as historically:
- Why does Selenium uses a lot of memory
- chromedriver.exe runs ~8 chrome.exe instances
- Many process of Google Chrome (32 bit)
- How to quit all the Firefox processes which gets initiated through GeckoDriver and Selenium using Python
and the remediation steps are mentioned in:
