Inefficient driver.get() performance in Loops with IEDriver

43 Views Asked by At

I'm using Selenium IEDriver to execute business operations on site A. When running the code on the server with userX via the command line, I notice that the duration remains stable at around 0.5 seconds throughout the loops. However, when using userY (a Windows agent user, on the same server as userX), the duration increases steadily by 50 milliseconds after each loop, causing our business processes to gradually slow down.

However, this slowdown does not occur if my_url is a login page; it only occurs after I have logged in to site A.

for i in range(0, 100):
    start_time = time.time()
    driver.get(my_url)
    end_time = time.time()
    duration = (end_time - start_time) * 1000
    printLogToFile(duration)

Please refrain from advising me to use eager or none page load strategies, as in our real-world scenario, we must wait until the page is fully loaded.

OS: Windows Server 2019
IEDriverServer.exe 4.14 64-bit Browser: Edge (IE Mode: 32-bit)

Your assistance in this matter is greatly appreciated.

0

There are 0 best solutions below