RequestPageHandler attribute

Version: Available or changed with runtime version 1.0.

Specifies that the method is a RequestPageHandler method, which handles the request page of a specific report.

Applies to

  • Method

Note

The RequestPageHandler attribute can only be set inside codeunits with the SubType property set to Test.

Syntax

Version: Available or changed with runtime version 1.0.

[RequestPageHandler]
procedure RequestPageHandler(var RequestPage: TestRequestPage)

Important

The above signature requires the RequestPageHandler method to be global. For more information, see Local and global scope in AL methods.

Arguments

RequestPage
 Type: TestRequestPage
The ID of a specific report.

Remarks

The RequestPageHandler method is called when a report is invoked in the code.

If you create a ReportHandler method, then that method replaces all code for running the report, including the request page, and a RequestPageHandler is not called. Only create a RequestPageHandler method if you are not using a ReportHandler one.

You use handler methods to automate tests by handling instances when user interaction is required by the code that is being tested by the test method. In these instances, the handler method is run instead of the requested user interface. The handler method should simulate the user interaction for the test case, such as validating messages, making selections, or entering values. You declare a handler type attribute on the method. For more information about handler methods, see Create Handler Methods.

AL Method Reference
Method Attributes
ReportHandler Attribute
Test Codeunits and Test Functions