When creating a project with dynamic selectors I keep getting the error “Variable is not defined in the current scope.” The variable I am using is already in the top level scope for the project.
It’s not very good warning message, I think. I raised the following topic but it still remains.
As workaround, if we set some value as default value in the variable, this message will disappear. Or we can ignore it.
Just delete that activity and reassign the activity, indicate the element and then pass the variable to the Selectors and check the Override default value option when passing variable to selectors. It will work now.
After passing the variable in the selector, then change the variable scope it will show the error. we have to do the above process.
Then it will works. It already works for me!!
Check the below thread for your reference.
Hope it helps!!
I am using a variable here in the selectors, can’t give the default value. or how can I give it a default value?