Window selector dynamic issue

Hi All,

I’m using use application/Browser Modern activity for my desktop app automation and in which I have set window attach mode property as Application instance, inside use browser activity I have other activities such as type into click, all inner activities are auto populating window selectors while capturing the element so now I want make that window selectors dynamic by adding wild cards to it but currently I have to update window selectors for each and every inner activity so my question is like the classic activity in Attached browser once we make dynamic selector for attach browser activity all its inner activity also gets updated automatically without manually making it dynamic one by one so here in Modern activity in use app/browser do we have any solution for it? by just updating value of window selectors in use app activity it will automatically updates all in its inner activity?

Thanks in Advance!!!

HI @Parmar_Snehal_Cognizant ,
Thanks for reaching out to UiPath Community.

You need to Define a variable or argument for the dynamic part of the selector in the parent Use Application/Browser scope.
if you have a dynamic part in the selector like wnd app=yourApp /> , you might change it to <wnd app='" + yourVariable + />.

This change will reflect across all inner activities that utilize this variable/argument in their selectors.


I dont want to use wildcard * not variable but I dont find window selector option in use app/browser activity can you pls check and help, I can see window selectors only in all inner activities

The window selector option is typically available only within the individual activities inside the Use Application/Browser scope, not in the scope itself in Modern acitivities.


yes correct so in order to make that selector dynamic I need to go and put wildcard or variable to all inner activities individually right, is there any way where in we can just make that window selector dynamic and that replicates to all it inner activity?

Well I came across this concept which might help you.
Its - Using Selector Constants in Separate Workflows:

Create Selector Constants Workflow:

  • Create a separate workflow file or sequence specifically dedicated to storing selector constants/templates.
    Store Selectors as Constants:
  • Inside this workflow, define constants or variables to store selectors.
  • Name these variables descriptively for easy identification, e.g. Selector_Window, Selector_Button, etc.
    Reference Constants in Activities:
  • Use the Invoke Workflow activity or the arguments/variables panel to pass these selector constants to individual activities.
  • Modify selectors inside activities to utilize these constants instead of hard-coded selectors.
    Update Selector Constants Workflow:
  • When selector changes are necessary, modify the selectors in this centralized workflow. This modification will reflect across all activities that reference these selectors.

Maybe this can help.