littlebear
4 months agoContributor
ADO Microsoft-Hosted Agent unable to navigate control
Hello, I am trying to get an ADO pipeline to run a Keyword test, and it is failing to do so. The Keyword test has one enabled step, to navigate to https://www.subzero-wolf.com/ in the Chrome browse...
- 4 months ago
Hi everyone, I have the solution.
The Chrome "Choose your user" menu was popping up before the browser could load, and my test was not taking that into account.
The SmartBear support work around for this as of 8/15/2024 is to add a PowerShell command in between the InstallTestCompleteAdapter step and the VSTest step. This tells Chrome that you are using a particular user, so you go immediately to the browser:
- powershell: $chromePath = "C:\Program Files\Google\Chrome\Application\chrome.exe" Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Google\Chrome -Name PasswordManagerEnabled -Value 0 Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Google\Chrome -Name PrivacySandboxPromptEnabled -Value 0 Start-Process $chromePath -ArgumentList "--profile-directory=Default", "--no-first-run", "--disable-search-engine-choice-screen" if (Test-Path -Path $chromePath) { $chromeVersion = (Get-Item $chromePath).VersionInfo.ProductVersion Write-Host "Chrome version: $chromeVersion" } else{ Write-Host "Chrome not found at the default location." } Start-Sleep -Seconds 60 Stop-Process -Name 'chrome' Start-Process $chromePath -ArgumentList "--profile-directory=Default", "--no-first-run", "--disable-search-engine-choice-screen" displayName: "Chrome Set Up"
In my file, which can be seen in another thread, this code would start on line 23 and end on line 38.
Good luck!