Ensure website is loaded before download

This commit is contained in:
Manuel Thalmann 2024-08-15 02:42:00 +02:00
parent 00519e29db
commit 200c3cfb80

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;