This is the example project for the Playwright C# tutorial. It shows how to start automating visual tests with Applitools Eyes and Playwright in C#.
It uses:
- C# as the programming language
- Playwright for browser automation
- Chromium as the local browser for testing
- NUnit as the core test framework
- Applitools Eyes for visual testing
It can also run tests with:
- Applitools Ultrafast Grid for cross-browser execution
To run this example project, you'll need:
- An Applitools account, which you can register for free.
- A good C# editor, such as Microsoft Visual Studio or Visual Studio Code.
- The .NET 7 SDK (which may come bundled with Visual Studio).
The main test case is AcmeBankTests.cs
.
By default, the project will run tests with Ultrafast Grid.
You can change these settings in the test class.
To execute tests, set the APPLITOOLS_API_KEY
environment variable
to your account's API key,
and then run:
dotnet build
pwsh Applitools.Example.Tests/bin/Debug/net7.0/playwright.ps1 install
dotnet test
If pwsh
is not available,
you must install PowerShell.
For full instructions on running this project, take our Playwright C# tutorial!