Validation Error - Forbidden Variables Usage In Selectors

I am trying to use a string argument as part of a selector for a NClick activity on a webpage. The NClick is inside of an NApplicationCard activity.

I am getting the error below:
Error: UI-DBP-030 - Forbidden Variables Usage In Selectors
The following UI Automaton activity Click ‘Introduction’ uses variables in selectors or in exchange for selectors. Only string selectors are allowed.
MyProject/Sequence.xaml
Recommendation
Detected forbidden variables in selectors as defined per rule. Please consider refactoring the code, to use only string selectors. Learn more.

The ‘Learn more’ hyperlink takes me to a page that explicitly states: Note:
This rule applies only to activities that are part of the Classic UIAutomation experience.

There are not any Classic activities in my workflow file and I have the Use Modern setting enabled.

Can someone assist?

Thank you for any help you can provide.

Regards,
symilawr

hey

please share a screenshot of your selector

regards

Hi fernando_zuluaga - thanks for the quick reply.

Here is the screenshot of the selector:

Regards,
symilawr

ensure that the datatype of the used variable / argument is of datatype: string

kindly verify that your variable is string type else convert it to string before the click activity

regards

Here is what I have for my argument:

Is there another string .Net Type that would work better than the default string that is used when I create an argument?

Just let us separate between runtime exception and Validation rule issue.

  • is the processe runable / running (maybe turn of rule validation before execution)?

It is a validation rule issue. It runs fine.
I have to fix the validation errors before I can publish the library.

Let’s assume we can trust and publish. can you check the following:

Once it is published feel free to submit your case to Uipath e.g. here:

Hi @symilawr ,

It seems that if you use an argument inside the Selector instead of a variable, we will get the Error/Warning from the Workflow Analyzer.

Some Options to Continue with this :

  1. Assign another string variable with the argument value and use the variable in the Selector.

  2. If you do have the Permissions, You can set the Forbidden Variable Usage Rule to Warning instead of Error in the Workflow Analyzer Settings.

  3. As @ppr mentioned, You Could Disable the Enforce Analyzer Before Publish

Thank you all for your help!

I tried assigning the argument to a variable but the problem persists.

I am going to set the Forbidden Variable usage rule to a warning like you suggested.

Much appreciated!

Regards,
symilawr

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.