Why even if UiPath Academy says we can use File exist and Find Element activities in Condition block but when I try it in Studio, it doesn’t let me add those activities.
I wanted to use File Exist for download process but I couldn’t add this activity in Condition block. I also tried to use Retry scope in Use App/Browser activity but it still didn’t work. Do you know why?
Yes, it’s true — File Exists and Find Elementcan be used in condition logic — but not directly as activities inside an If or Retry Scope condition block. The confusion is likely because:
Those activities are not “expressions” — they are activities that return values (e.g., a Boolean for File Exists, or a UIElement for Find Element).
In If, While, or Retry Scope conditions, UiPath expects a Boolean expression, not an activity.
You’re likely trying to drag File Exists or Find Element directly into the Condition property of a Retry Scope or If activity. But those properties don’t accept full activities, they expect a Boolean expression like fileFound = True.
For File Exists:
Use the File Exists activity before the If or Retry Scope condition.
Store the result in a Boolean variable, e.g., fileFound.
Then in your If or Retry Scope, use fileFound as the condition.
@singh_sumit Yes, I already did it like you explained but why UiPath academy says opposite. I thought maybe there were another way to do it but I don’t know yet. Even UiPath academy gives wrong information about this
UiPath Academy often teaches best practices based on more generalized workflows, but the platform evolves, and sometimes certain details get lost in the updates or new versions. The idea behind their instructions was likely meant to demonstrate how you can work with Boolean expressions
The activities that can be used directly as a condition for RetryScope must have a return type of Bool, not just an OutArgument<bool>. It’s an implementation detail that throws it off (IIRC the “old” versions of the *Exists would work there, but the new ones don’t).
And yes, the Academy is wrong here, and you’re correct.
Yes, you’re right. And another thing that I noticed
They say “if the condition is checked and is False, then there will be another retry.”, but it also doesn’t work like this. When the condition is False for Business Rule Exception, it behaves as if an error is thrown. Look at that, I’m getting different exceptions for condition block and check the results.
As you’ve seen, When the Value is False, it didn’t jump to Condition block and retried the Action block again as if an error is thrown. But indeed there was not a throw here.
As you’ve seen, it jumped to condition block and checked if it’s true like we expected because there was not a throw here for System exception as well.