diff --git a/scripts/Common/Scripts/BrowserAutomation.ps1 b/scripts/Common/Scripts/BrowserAutomation.ps1 index 5d04825c..1b3e1fc8 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;