Hi Friends,
I am opening existing session without using credential if it takes time to open then how to handle using try catch
Hi @Rup_1
Identify a unique element from home screen using find element and place it in do while loop.
Thanks
Buddy @Rup_1
Great, kindly follow the below steps that could resolve your issue buddy
- Yah you can use try catch block in this design
- Inside try block, you can either use any one of the following activities based on your session
–like if elements in your session are accessible, then you can use on element appear activity in try block, that would wait untill the element appears on screen
–Or if elements in your session are not accessible, you can use on image appear in try block that would wait until an image appears on screen, that would usually appear once credential page gets loaded.
–The reason why i didn’t add delay activity here in the list is, if we use delay option, the workflow would until the time that we hav mentioned in the delay activity though the page appeared already, This would reduce the performance of the workflow that we design…Ok fine you may ask even the above two have TimeOut MS property where we can mention some time more than the default value of 30 sec…yes we mention in that too, but once the page gets loaded and element or image appear, flow moves to the next activity it wont wait till the time that wementioned in timeoutMS…one or two activities of delay wont impact muc in this case but if we are using manytime, huge difference in performance occurs right…Thats why buddy
Cheers buddy
we can use retry scope and give the condition element exists. so It will retry for given number of times till that element appears
or
while doing any action change wait for ready property to complete.
Is that working buddy
Cheers
It’s very simple. you can use Retry Scope this activity is Retries the contained activities as long as the condition is not met or an error is thrown.
Can you please check this link, this will be useful for your solution.
https://activities.uipath.com/docs/retry-scope
Thanks,
Arunachalam.