I am trying to run Playwright with specflow in Azure DevOps. I've successfully integrated with Azure pipelines and whenever I make a new change in the code base and push it to the GitHub, a build in the pipeline is triggered. It is working as expected.
But, I want to integrate test cases with automation scripts. For this, I've successfully integrated automated test cases with test cases in Azure DevOps. I've also created a release plan and added artifacts and tasks.
The task runs successfully, It installs the playwright and browser in the published artifact.
But the test still fails and throws an error.
The error says:
Error message
Microsoft.Playwright.PlaywrightException : Executable doesn't exist at C:\Users\VssAdministrator\AppData\Local\ms-playwright\chromium-1105\chrome-win\chrome.exe
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ pwsh bin/Debug/netX/playwright.ps1 install ║
║ ║
║ <3 Playwright Team ║
╚═══════════════════════════════
I am running the same script in the YML file and it is successfully working in the build pipeline, but I am having this issue.
Any help will be appreciated.
I resolved it by updating script to pwsh playwright.ps1 install
And updating Working Directory to
$(System.DefaultWorkingDirectory)/_TestPlayWright/TestBuildArtifact/bin/Release/net6.0