Ensure website is loaded before download
This commit is contained in:
parent
48279e13ad
commit
0605d9bcb0
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue