al-page-script

Guides users to record and replay Business Central Page Scripting E2E test scenarios.

4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/FBakkensen/bc-agentic-dev-tools-marketplace --skill al-page-script-fbakkensen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: al-page-script
Source: https://github.com/FBakkensen/bc-agentic-dev-tools-marketplace/tree/main/plugins/al-agentic-dev/skills/al-page-script
Command: npx skills add https://github.com/FBakkensen/bc-agentic-dev-tools-marketplace --skill al-page-script-fbakkensen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @microsoft/bc-replay, and includes references (resource) components.

What problem does it solve? Some Business Central behaviours (control add-ins, canvas, web-client-only UI) cannot be automated by AL unit or integration tests, leaving the E2E layer of the test pyramid uncovered. This Skill coaches the user through recording those scenarios in BC's Page Scripting recorder and replays each recording on a fresh container to prove it re-runs cleanly. ## Core Features & Use Cases - Guided recording sessions: Turns each Journey Example marked Record: yes in a verify task's Verification Plan into a punchline-first scenario card with Do/Check steps and a re-runnability coaching tip. - Clean-state replay gating: Spawns a fresh container before every replay so recordings that hardcode values or pick rows positionally fail fast and get re-recorded. - Failure classification: Reads replay artifacts (error-context.md, replay-log.yml) to classify reds as bad recording, real production bug, or oracle-blind/unscriptable, and routes each to the right next step. - Use Case: After /al-refine marks a sales-order posting scenario as Record: yes, run this Skill to walk the user through recording it in the Page Scripting recorder, replay it on a fresh container, and commit the green .yml before user verification. ## Quick Start Run /al-page-script on a verify task that is ready-for-verification with Record: yes Journey Examples to start the guided recording session.

Frequently Asked Questions about al-page-script

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I record an E2E test for Business Central pages?

Open the Web Client, go to Settings then Page Scripting, press Record, perform the scenario gestures, add validations via right-click then Page Scripting, and Save to download the .yml file. The agent then replays it on a fresh container to confirm it re-runs green.

When should a Business Central behaviour be recorded instead of unit tested?

Record only behaviour no lower test layer can automate, such as control add-ins, canvas, or web-client-only UI. The /al-refine step makes this call by marking a Journey Example Record: yes; anything an AL Runner or TestPage test can assert stays at the lower layer.

Why does a Page Scripting recording fail on replay?

Common causes are hardcoded record numbers that collide on fresh data, positional row selection, unanswered dialogs, or validating a rounded display field instead of the stored value. The replay writes error-context.md and replay-log.yml under test-results, which identify the failing step.

Does bc-replay require a specific Node.js version?

Yes, replay needs Node 22 or later on PATH because @microsoft/bc-replay bundles @playwright/test. Node 26 runs replays fine, but a fresh Playwright browser download may hang on Node 26 and later, so keep browsers cached.

Can the agent write or edit Page Scripting YAML recordings directly?

No, the recorder is the generator and the agent never authors .yml from scratch. The only exception is a surgical, approval-gated edit to an existing recorder-produced file, such as bumping a wait or fixing one operator, which must then replay green.

What permissions are needed to record Page Scripting in Business Central?

Recording requires the PAGESCRIPTING - REC permission set, which the container's admin or SUPER user carries. Replay only needs PAGESCRIPTING - PLAY. Recording is limited to local container hosts, never production dynamics.com tenants.