Hello. I have a problem with the If condition. I have included an Element Exists activity and underneath it included the If activity and placed all the activities that need to be run in both Then and Else. I alse created a boolean variable and set it to true, so if the condition is true, it will run the Then part, else it will automatically go to the Else part. All works good, however, the timing is the main problem that I still can’t figure out. Let’s say the condition is true, the activities take around 20 seconds to perform. But if the activity is false, I will have to wait 30 seconds for the Else part to be executed which is not what I want. And if I set the timeout to 0 in the Element Exists activity, if I debug the script and the condition is true, it will not run any activities inside the Then part. So, i’m kind of stuck in between. Any ideas on how to fix this?
This has nothing to do with what I’m asking. I already know these and even if I set waitforready to none, it makes no difference.
Okay, Then try to look the settings of the project as below
You can check those
Hope this may help you
Thanks
Hi,
Can you share your workflow snapshot ? and also, whats the reason to put the default value to True. I believe if the element does not exist, you wish to execute else part.
From what I read, since Element does not Exist, BOT waits 30 seconds (which is default) time before it puts the variable to false.
You can rather change the Timeout to 10 seconds or 20 to match with Then performance.
I just fixed the issue by delay to 2000ms. all works now well. thx