How can I create a custom scope in my library?

Hi,

how can I create a custom scope for my UIPath UI library?
For example we have a web application / Website in our company, where I build some library activites around. But all of them would need the same browser instance.

So the idea is to add to the library a “myapp Scope” first that has the UIElement (the browser - indicate programm …) and every other activity goes inside it and kind of inherits the UIElement so they always know the state of the Web App.

As of right now I could not figure out how to achieve this, also not with extensive google search.

If this is for some weird reason not possible, what is considered best practice to always use the same current browser session? Put a Input Element in every activity I create inside this web app library?

TLDR: I want to create my custom Scope Activity, how to achieve this?

Thx Guys

Hi,

In general, we need to use VisualStudio to create a activity which has scope. And activity creator VS extension will help you.

BTW, your requirement seems similar with ElementScope activity. Does this work for you?

Regards,

1 Like

Hi Yoichi,

thank you very much.
I will check out the activity creator.

Edit: @Yoichi ==> Can’t use it unfortunatelly cause I only have Visual Studio 2022. This extension only works in 2019.

About the element scope. I was able to find it after i enabled the classic activity filter. I normally use strictly modern activities.

Can I combine this Element Scope with modern activities (click etc)? Anyway i will give it a try.

Thx very much again.

1 Like

Hi,

I hope UiPath updates it for VS2022 soon.

Can I combine this Element Scope with modern activities (click etc)? Anyway i will give it a try.

Sorry, but I have never tried it. I’m glad if you could share your result of try.

Regards,

1 Like

Hi,

I’m just playing around with Element Scope, but it doesn’t give me what I want.
My idea is after I finish the library that a user who uses it can do the following:

  • Drag and Drop the MyApplication Scope into the Sequence
  • After done it looks like this but custom:
    image
  • So basically the user can then proceed to drag and drop the other activites from the library INSIDE the scope (like in this example shown here “Excel Application Scope” ==> But instead of excel it’s my own custom “app”
  • But the more I think of it the more I believe this is not possible
  • This would be a really nice addition to give a developer this tools in future update => Like a “root” container, that passes “props” and things the developer can define to it’s “children” (thinking in React.js here if you know that :smiley: )
  • In summary I want my lib to look like this after it’s done:
    image
  • A scope and some folders for it’s “inside” activites, nicely structured (i know the folder structure is possible as of right now, but the scope is the thing im missing very much)

I hope that makes sense. THx