SelectAssignDefaultCategoryActionOnCustomerCard

With the helper function, we touch on the core of this test example – making use of a test page to achieve #0007, that is, testing that the user can assign a default customer category to a specific customer. The following is what the helper function looks like:

local procedure
SelectAssignDefaultCategoryActionOnCustomerCard(
CustomerNo: Code[20])
var
CustomerCard: TestPage "Customer Card";
begin
CustomerCard.OpenView();
CustomerCard.GoToKey(CustomerNo);
CustomerCard."Assign default category".Invoke();
end;

Note that I did not use a with-do construct to unambiguously show that the three statements in the function are referencing methods that you will only find on test page objects, and not on normal pages:

  • OpenView: Opens the test page in view mode
  • GoToKey: Finds the row in a dataset that is identified by the specified values
  • Invoke: Invokes an action on a test page

For a complete listing of all test page methods, take a look at the following URLs:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.40.43