diff --git a/scripts/Common/Scripts/BrowserAutomation.ps1 b/scripts/Common/Scripts/BrowserAutomation.ps1 index 1ea3f272..89b4b328 100644 --- a/scripts/Common/Scripts/BrowserAutomation.ps1 +++ b/scripts/Common/Scripts/BrowserAutomation.ps1 @@ -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;