Coded Automation "uiAutomation" class unavailable in v23.8 package

Hi All,
I am trying to use the Coded Automation workflow and in the tutorials available, they are using a class “uiAutomation” to use the activities. I am using the 23.8 coded workflow package, but I am not able to find the class and getting error. Can someone help?

Hello @Matt_Davis

  1. Check and update your package dependencies using “Manage Packages” in UiPath Studio.
  2. Verify that you have the correct Imports statements for namespaces.
  3. Ensure version compatibility between your packages and tutorials.
  4. Use standard UiPath Core activities when in doubt.
  5. Double-check the tutorial and documentation you’re following for package and version information.
  6. Seek help on the UiPath Community Forum or from UiPath support if needed.
  7. Ensure custom packages or code are correctly installed and configured.

Thanks & Cheers!!!

As of now the official documentation doesn’t go that much in detail but I’ve found by poking around that uiAutomation is a field of the CodedWorflow class.

If you right-click that class in your CodedWorkflow and click “Go To Definition” it might take you to a file like this:

namespace MyProject
{
    public partial class CodedWorkflow : CodedWorkflowBase
    {
        public CodedWorkflow()
        {
            _ = new System.Type[]{typeof(UiPath.Testing.API.ITestingService), typeof(UiPath.UIAutomationNext.API.Contracts.IUiAutomationAppService), typeof(UiPath.Core.Activities.API.ISystemService)};
        }

        protected UiPath.Core.Activities.API.ISystemService system { get => serviceContainer.Resolve<UiPath.Core.Activities.API.ISystemService>(); }

        protected UiPath.Testing.API.ITestingService testing { get => serviceContainer.Resolve<UiPath.Testing.API.ITestingService>(); }

        protected UiPath.UIAutomationNext.API.Contracts.IUiAutomationAppService uiAutomation { get => serviceContainer.Resolve<UiPath.UIAutomationNext.API.Contracts.IUiAutomationAppService>(); }
    }
}

This way I’ve had success by using this.uiAutomation. Curiously enough, the IntelliSense can find the system field as normally expected.

Also pretty interesting is the fact that after typing this.uiAutomation with IntelliSense for the first time, now IntelliSense can find it without the this keyword.