Ensure website is loaded before download

This commit is contained in:
Manuel Thalmann 2024-08-15 02:42:00 +02:00
parent 1e3968fd0d
commit a5430d0298

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;