Skip to main content
Question

Unable to run the automation script on Modern UI .

  • October 16, 2025
  • 4 replies
  • 84 views

I have created a 25R2 Modern UI instance, added all 25R2-related dependencies into the automation framework, and created wrappers for CS201010 using 25R2 (ClassGenerator.exe.config). However, when I run the automation test script, the automation report shows errors, such as the “Add” button not being present, even though it is visible in the UI.

 

4 replies

  • Freshman I
  • February 12, 2026

Any update on this question. I see the same problem on 2026 R1 beta. TestSDK has only one line about Modern UI. There is not much help in testsdk. GitHub repository for TestSDK/automation is also two year old. 


Forum|alt.badge.img+1
  • Jr Varsity I
  • February 13, 2026

Hi ​@Kjat33 
Can you please provide the Script for reference so that we can find the missing thing?

 


Forum|alt.badge.img+1
  • Jr Varsity I
  • February 13, 2026

Any update on this question. I see the same problem on 2026 R1 beta. TestSDK has only one line about Modern UI. There is not much help in testsdk. GitHub repository for TestSDK/automation is also two year old. 

Please provide your script.


  • Jr Varsity I
  • May 4, 2026

Hello Kyat33.

The main problem is that You tried to generate the Wrappers of Modern UI via ClassGenerator.exe and ClassGenerator.exe.config. You should use the way which is briefly described in SDK - README. Although the documentation provides very limited information, I could understand the workflow after the research. You can compare the Wrappers generated in 2 ways, after comparing the Wrapper of the same Screen, You could notice some differences.

So, the wrappers for Modern UI should be generated by .NET Console Application Core project. References in .csproj file should also be added.

<ItemGroup>

      <PackageReference Include="Execution" Version="25.201.213.220" />

      <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />

      <PackageReference Include="PX.QA.WrappersGenerator" Version="25.201.213.220" />

</ItemGroup>

 

It also requires the nuget package to be installed. You can use this command to install it. Please also pay attention on the version.

Install-Package Microsoft.Bcl.AsyncInterfaces -Version 5.0.0

 

In Your new console application create a new class which will contain the method to generate the Wrappers. The arguments of the method would specify the Acumatica instance URI, username, password, tenant, wrapper’s code namespace, path of the generated files, log result information and error response. In this code I specified the Automation Testing project itself as the destination of the generated wrappers. It is important to ensure the screen is in Modern UI view for the user account provided in the credentials. Here is the template example of the code, with some explanations of the package usage.


internal class WrappersGenerator
{
public static void MethodGenerator()
{
//WG is available in PX.QA.WrappersGenerator
//Log and its methods are available in Execution
var wg = new WG("http://localhost/PayPal_25_201_0213", "admin", "psw1234", "Company",
"WrappersModernUI",
"C:\\Users\\vachagan.mirzoyan\\source\\repos\\TestPaypal_25_201_0213\\TestPaypal_25_201_0213\\WrappersModernUI",
_ => Log.Information(_),
_ => Log.Error(_));

wg.RunAsync("BZ501001").Wait();
}
}

 

The Web.config file of Acumatica instance may require this to be added in <appSettings> section.

<add key="EnableSiteMapSwitchUI" value="True" />

 

The remaining steps of the using the Wrappers, are the same. Have Your own custom class derived from the generated wrappers, and use the UI element via Your custom class.

I could automatically insert value into the Modern UI fields via this approach.
Please let me know if this helps You.