web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :

Exploring Preview Power Fx Functions in Power Apps Test Engine

Inogic Profile Picture Inogic 1,135 Super User 2025 Season 2

Microsoft Power Apps Test Engine provides a powerful automation framework to validate Canvas apps using test plans written in YAML and Power Fx.
With the recent releases, Microsoft has introduced Preview Power Fx functions, enabling deeper, more realistic interaction with the app, pausing test execution, running Playwright scripts, and more.

Prerequisites

  1. To start using the preview functions, ensure you have the Power Platform CLI (pac CLI) installed with version 27.5 or later.
  2. Before getting started with this blog, make sure you've completed the necessary setup and configuration. You can follow the instructions provided in this blog link to get everything ready.

Please find some preview PowerFx functions that we can use to create a YAML test suite:

1. Preview.Pause(milliseconds: Number)

Purpose: Pauses the execution of the test for the given number of milliseconds. Useful when you need to wait for UI changes, animations, async data loads, or events before the next test step. This is a non-blocking delay function used between steps.

Example:

Preview.Pause(2000); // Wait for 2 seconds

2. Preview.PlaywrightAction(action: Text, selector: Text)

Purpose: Executes a raw Playwright UI action on an HTML element using a selector. This enables fine-grained UI control, such as clicking DOM elements directly. Supported actions: "click", "dblclick", "hover", "fill", "press", etc.

Example:

Preview.PlaywrightAction("click", "text=Submit");

3. Preview.PlaywrightActionValue(action: Text, selector: Text, value: Text

Purpose: Like PlaywrightAction, but lets you pass a value with the action — e.g., for filling input fields.

Example:

Preview.PlaywrightActionValue("fill", "input[name='email']", "test@example.com");

---Read More>>

Comments