From 270eca903e649103b9e61bae1e5a75dd1890cc56 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 26 Sep 2024 04:09:49 +0200 Subject: [PATCH] Refactor reWASD download for new website --- scripts/Windows/Software/reWASD/Manage.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/Windows/Software/reWASD/Manage.ps1 b/scripts/Windows/Software/reWASD/Manage.ps1 index 7781f411..bc9de734 100644 --- a/scripts/Windows/Software/reWASD/Manage.ps1 +++ b/scripts/Windows/Software/reWASD/Manage.ps1 @@ -34,7 +34,13 @@ param( -Installer { Write-Host "Downloading reWASD…"; $dir = New-TemporaryDirectory; - $file = Start-BrowserDownload -URL "https://rewasd.com/" -ButtonSelector 'a.btn-default[href="#"]' -OutDir $dir -Timeout 1; + Import-BrowserAutomation; + + $file = Start-BrowserDownload ` + -URL "https://rewasd.com/" ` + -ButtonSelector ([OpenQA.Selenium.By]::XPath('//nav[contains(@class, "navbar")]//a[contains(@class, "btn-outline-default")][normalize-space(text()) = "Download"]')) ` + -OutDir $dir ` + -Timeout 1; Write-Host "Installing reWASD…"; Start-Process -Wait -FilePath $($file.FullName) -ArgumentList "/S";