Ensure website is loaded before download

This commit is contained in:
Manuel Thalmann 2024-08-15 02:42:00 +02:00
parent 48279e13ad
commit 0605d9bcb0

View file

@ -91,6 +91,10 @@ $null = New-Module {
$browser = [OpenQA.Selenium.Firefox.FirefoxDriver]::new($options);
$browser.Navigate().GoToUrl($URL);
while (-not ($browser.ExecuteScript("return document.readyState;") -eq "complete")) {
Start-Sleep 0.1;
}
try {
$null = & $downloadAction -Browser $browser;