With the page scripting tool, clients and consultants can easily record and replay user acceptance tests directly in the Business Central web client, achieving greater test coverage and reducing costs.

What does it provide in brief?

The page scripting tool in the Business Central Web client allows you to record and replay your actions, such as opening pages or entering data.

 You can save the recording and share it with others to play it in the future.

An important use case for the tool is the acquisition and execution of acceptance tests (UATs) by users.

Using the tool

To start recording your actions, select Start New or select New > New Recording  in the toolbar at the top of the pane. Once the recording starts, perform the actions you want to capture.

The page scripting tool will capture your on-screen interactions and the resulting actions, such as opening or closing pages, selections, entering data, and so on.

To stop recording, use the Stop button in the toolbar. To resume recording multiple steps, select the round Start Recording button  in the toolbar.

The following illustration illustrates some of the steps and toolbar that you captured (during recording).

Using Expressions in Properties

Values and conditions can use expressions for simple calculations. Power Fx comes writing language. In the user interface, there is a link to the Power Fx expression reference.

In addition to the Power Fx functions, three objects are available:

  • Clipboard to access the current voices copied into the recording.
  • Parameters to access the value of any parameters passed to this registration.
  • SessionInfo for session information such as the current user ID.

Make some steps conditional

Another option when recording is to insert a conditional branching step. For example, let’s say you only want to perform a few steps during playback if there are no current rows in a list.

To insert a conditional step, right-click a page control, select Add conditional steps when, and then select an option.

After you enter the conditional step, you can add additional steps to perform if the condition is met.

To end the condition, select End scope in the Page Scripting list  .

The actual condition can be changed by selecting the condition step in the page’s list of scripting steps, expanding the properties, and setting the rule and comparison value.

Save your recording

You can save the recording from the toolbar. This creates a YAML file that you can download, share, edit, and reopen for playback

You can also share a recording

You can share a recording as a link by selecting Share in the toolbar. The link includes the full recording and its playback result. In the example below, playback failed halfway through the recording.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *