Skip to content

applitools/example-playwright-csharp

Repository files navigation

Applitools Example: Playwright in C#

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:

It can also run tests with:

To run this example project, you'll need:

  1. An Applitools account, which you can register for free.
  2. A good C# editor, such as Microsoft Visual Studio or Visual Studio Code.
  3. 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!