You can’t pass a selector dynamically, but you can pass a Library of Selectors using Object Repository.
Here’s a short two part tutorial on Object Repository.
It is also much more versatile than the traditional method of capturing each selector, as three types of selectors are uniquely identified:
All three can be toggled on or off, depending on your requirement and also there is an anchor that helps solidify your selection.
Once the repository has been finalized, you can publish into Orchestrator and share it with others. If any changes are to be made, the library can be edited and republished.
If you wish to make sure the changes are reflected in all instances(dependencies) of the library, you should update it via:
UiPath Studio>Tools>Project Dependencies Mass Update
I hope you find this helpful!