问题
I am using Selenium and Java for my tests. After a test completes, I download the HAR file which I later use for analyzing certain domains that exist in the page. I found that the HAR file that I download doesn't contain complete log of all the requests for that page. How do I wait until entire network traffic for a page completes before downloading the HAR file?
I did try to use wait before downloading the HAR file but didn't work. Can you suggest some other ideas?
WebDriverWait wait = new WebDriverWait(driver, 60);
wait.until(ExpectedConditions.jsReturnsValue("return document.readyState==\"complete\";"));
来源:https://stackoverflow.com/questions/58536303/how-to-wait-until-all-network-logs-in-generated