diff --git a/Private/Helpers/Get-WebDriver.ps1 b/Private/Helpers/Get-WebDriver.ps1 index a0b53a5..fc2d05f 100644 --- a/Private/Helpers/Get-WebDriver.ps1 +++ b/Private/Helpers/Get-WebDriver.ps1 @@ -102,6 +102,7 @@ function Get-WebDriver { } # Expand archive and replace the old file Expand-Archive "$webDriversPath\chromeNewDriver.zip" -DestinationPath "$webDriversPath\tempchrome" -Force + Remove-Item "$($webDriversPath)\chromedriver.exe" -Force | Out-Null Move-Item "$webDriversPath\tempchrome\chromedriver-win64\chromedriver.exe" -Destination "$($webDriversPath)\chromedriver.exe" -Force # clean-up @@ -147,6 +148,7 @@ function Get-WebDriver { # epand archive and replace the old file Expand-Archive "$webDriversPath\edgeNewDriver.zip" -DestinationPath "$webDriversPath\tempedge" -Force + Remove-Item "$($webDriversPath)\msedgedriver.exe" -Force | Out-Null Move-Item "$webDriversPath\tempedge\msedgedriver.exe" -Destination "$($webDriversPath)\msedgedriver.exe" -Force # clean-up