Rediger

Del via


Power Platform Playwright samples overview

Screenshot of the Playwright logo used in Power Platform Playwright samples.

Power Platform Playwright samples is an open-source repository that provides a framework that lets you write reliable, maintainable end-to-end tests for all Power Platform app types. Built on Microsoft Playwright, it provides a Page Object Model (POM) pattern, built-in authentication helpers, and reusable components designed specifically for the Power Platform runtime.

Note

This framework is the recommended Playwright-native alternative to Power Apps Test Engine for teams that prefer TypeScript, full IDE integration, and direct Playwright API access.

Key capabilities of Power Platform Playwright samples

Power Platform Playwright samples provides these features:

  • Unified app launcher: A single AppProvider class launches any app type—canvas, model-driven, or AI-generated—with a consistent API.
  • Page Object Model: Pre-built ModelDrivenAppPage, CanvasAppPage, and GenUxPage classes expose high-level methods so your tests read like requirements.
  • Built-in grid and form components: GridComponent and FormComponent handle the complex AG Grid and form DOM structures without custom selectors.
  • Dual-domain authentication: Storage state files cover both the Power Apps domain and the Dynamics 365/CRM domain, acquired once and reused across all tests.
  • AI-assisted authoring: Integrates with the Playwright MCP server so AI coding assistants like GitHub Copilot and Claude can generate, fix, and explain tests directly in your IDE.
  • CI/CD ready: Works headlessly in GitHub Actions, Azure Pipelines, and any Playwright-compatible environment.

Supported app types

App type Page object Description
Canvas apps CanvasAppPage Apps built in Power Apps Studio
Model-driven apps ModelDrivenAppPage Apps built on Dataverse with views and forms
Custom pages ModelDrivenAppPage Canvas pages embedded in a model-driven app
AI-generated apps (Gen UX) GenUxPage Apps generated by Copilot in Power Apps

How the testing framework works

The framework is a Rush monorepo with two packages:

Package Description
power-platform-playwright-toolkit Core library containing page objects, components, locators, and authentication helpers. Reference this package locally.
e2e-tests Reference implementation with sample tests targeting the Northwind Traders solution. This implementation is your starting point.

Clone or fork the repository to use the framework. Full source access gives you visibility into every selector and helper, and lets you adapt the library to your environment.

When to use this framework

Use Power Platform Playwright samples when you need:

  • TypeScript native tests with full IDE support and type safety
  • Direct access to the Playwright API (page, locator, expect)
  • Cross-browser test execution (Chromium, Firefox, WebKit)
  • AI-assisted test generation with Playwright MCP server
  • Integration with existing CI/CD pipelines

Comparison with Power Apps Test Engine

Capability Power Apps Test Engine Power Platform Playwright samples
Language Power Fx YAML TypeScript
Runtime .NET Node.js
IDE support Basic Full VS Code / JetBrains
Authentication Config file Reusable storage state
Page Object Model No Yes
AI authoring No Yes (Playwright MCP)
Custom assertions Limited Any Playwright/Jest matcher
Supported app types Canvas, model-driven Canvas, model-driven, custom pages, Gen UX

Next steps

See also