---
title: "How to Integrate Playwright C# code via Code Templates"
slug: "how-to-integrate-playwright-c-code-via-code-templates"
updated: 2026-06-03T11:28:28Z
published: 2026-06-03T11:28:28Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.curiositysoftware.ie/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Integrate Playwright C# code via Code Templates

Quality Modeller is framework-agnostic, it generates automated test scripts in whatever language and tooling your team already uses. This page covers how to configure Quality Modeller to work specifically with **Playwright**, so that models you build in Quality Modeller produce Playwright test scripts ready to run against your application.

This configuration involves telling Quality Modeller what Playwright test code should look like via code templates. Once this is in place, testers can build and update models without touching the underlying code. Quality Modeller handles generating and synchronising the Playwright scripts automatically.

Please view the introduction to code templates [here](/kb/docs/code-template#introduction) to have the full breakdown of the functionality of Code templates and initial setup.

## PageObjectClassTemplate showcasing the master template for Playwright C#

![Screenshot of the Curiosity UI showing Code Template Items for 'Playwright C# PO'. Left column lists template identifiers (e.g., PageObjectClassTemplate) with a purple selected item. Right pane shows a code editor with C# PageObject class template code and line numbers. The interface has a top toolbar and a vertical left navigation bar with icons.](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/how-to-integrate-playwright-c-code-via-code-templates_page_0001_img_02.png)

1

## Test Case method **Click** within Playwright, in which contains the keyword **ClickAsync()**

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-X8G21FXN.png)

## Test Case method **SendKeys**within Playwright, in which contains the keyword **FillAsync()**

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-QPLO9E6X.png)

## Test Case method **Select**within Playwright, in which contains the keyword **SelectOptionsAsync() - handling a dropdown on a web page**

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-IFF0E30D.png)

## PageObjectIdentifier to handle the Playwright GetByTestId() Locator

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-FGCAS1PT.png)

## Master template for Test cases in Playwright to represent the entire test suite for a particular model

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-ID5UDWUM.png)

## TestCaseMethodTemplate to handle a typical Test within Playwright C#

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-9UN9YKIU.png)

To download an initial setup of PageObjects and Test Cases specifically for Playwright, you can download and import them into your workspace: -

[](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/Playwright CSharp PageObjects.json)Playwright CSharp PageObjects6.63 KB[**](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/Playwright CSharp PageObjects.json)[](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/Playwright CSharp TestCases.json)Playwright CSharp TestCases2.71 KB[**](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/Playwright CSharp TestCases.json)

In Configuration, Scroll down to Code Templates, you will see the following options, select **Import**- the option appears to then allow you to import the files into your project![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-734OM6NI.png)
