Hello Acumatica Community,
In standard procedure, Acumatica’s TestSDK relies on Wrapper/Extension combo to translate the UI screen elements to a code file(wrapper) then make that code accessible to your tests using an Extension file.
This works in 98% of the cases, and is the recommended format for all tests.
Some good reasons to use DynamicControl over the standard wrapper/extension format are:
- When you need to preconfigure your initial state test website before wrappers can exist, and you need to use your custom screens or enable a feature to complete the config (screens must be configured via TestSDK code before wrapper generation or else the screen will fail to generate successfully)
- When you add 1 or 2 simple buttons or fields to an existing Acumatica screen, and you want to test it without generating a new wrapper/extension combo.
- In the rare case a field is not generated through classgenerator.exe
Some simple examples:
Case.Attributes.DynamicControl<Input>("Testing Details").Type("Test Details #2"); //find the input field with UI Text of “Testing Details” and type in "Test Details #2"
Dashboard.Dashboard.Wizard.AddPXTrendcardWidget.DynamicControl<Button>("Configure").Click(); //click the “Configure” button
Many more examples of all types can be found in the guide below for reference.
https://github.com/Acumatica/Test-SDK-Starter-Guide/tree/master/ISVTestSDK/Documentation