I have a login form. I need to enter my username and password in that form in order to log in. I have automated that part. But, sometimes I stay log in and the flow fails because it fails to find the UI elements - username and password. I tries to make the continue on error property true, but it still does not work. Please help!
You can surround your login code with the Try Catch Activity.
And also you can use Element Exist Activity to check if it’s already logged in, the activity gives the boolean result you can act accordingly based on that.
Thanks.
ways:
1)just before the login(type into) use an element exists to check if the space to enter username and password is present to not, if present then then proceed with login else don’t do the login process
2)add a try catch across the whole login , - this is not a recommended way, but if you cant solve using the way (1) then use this
Hope this helps
Please let me know if you have any questions
Thank you,
Saurabh
@harmeet_kaur May I know why do you want to continue the process though the bot fails at login part. Even if you continue the process bot cannot perform any actions since it was not able to login. At this moment, it again fails
The best approach would be if the bot fails to login retry for another time or simply stop the process notifying the team through email
If I will not get the login page, I will already be logged in (Since I was login before). For e.g.- If I sign in for the first time, I get the login page and the flow works fine but when I try to run the flow next time, I will already be logged in. I will directly take me to the application without showing the login page. It is where it fails.
@harmeet_kaur Keep the login part in a try catch block. So that if any exception occurs it handles that and continue the process. Check the below workflow for ref
Example.zip (2.4 KB)
I tried to have try-catch, but it is not working. I am not getting the message box. It just stays as it is. Nothing is happening.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.