I am wondering if it’s possible to call UiPath default activities when designing a custom c# activity using the Activity Creator.
For example, if at some point I need a ‘Click’ or a ‘Get Text’, is it possible to call those activities and provide inputs as if I was using them in Studio? If it is possible, how do I do that or is there any documentation regarding this topic?
Yes, it is possible to use UiPath’s default activities within a custom C# activity created using the UiPath
To achieve this, you’ll need to do the following:
Reference UiPath’s Core Activities: Make sure to reference the UiPath.Core.Activities assembly in your custom activity project.
Import Required Namespaces: Import the relevant namespaces from the UiPath assemblies to access the activities you want to use. For example, you might use using UiPath.Core.Activities; to access the core activity classes.
Create Activity Properties: Define properties for your custom activity that correspond to the inputs required by the UiPath activities you want to use (such as selectors or element references).
Implement the Activity Logic: Inside your custom activity’s Execute method, use the properties you defined to set up the inputs for the UiPath activities you want to use. Then, call these activities as needed.
Test and Debug: Build and deploy your custom activity to test its functionality within UiPath Studio.
Keep in mind that while this approach allows you to utilize existing UiPath activities, it may require careful consideration of how you handle the configuration and execution of those activities within your custom activity.
For more information refer this link for better understanding.
Thank you @Parvathy@Usha_Jyothi , I checked the links and provided and I was already using the activity creator for this task. Sadly, I was unable to find any information regarding the use of UiPath activities with that project in the documentation section provided.
I did however find the following discussion, which provides some insight as to how to implement a click method:
For this I would have to add the NuGet package ‘UiPath.UIAutomation.Activities’. Is this correct?
@Parvathy The video is not related to my question, as I know you can create libraries with UiPath Activities.
My initial questions still remain, in the Activity Creator in Visual Studio, it is possible to add standard UiPath activities to your custom code (for exemple, a mouse click or a get text)? If so, how does one accomplish that and is there any documentation regarding that?