Skip to main content

TestSDK Dynamic Control - Access UI elements without extension files


AaronB
Varsity II
Forum|alt.badge.img+1

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:

  1. 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)
  2. 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.
  3. 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

Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings