Hi
I was practicing the gmail login automation, it work well.
But sometime when the page is launched, email is already logged in, is there any way to put a condition to check if the username is logged in or not?
Hi sainiboy,
The log out process should undoubtedly be completed properly so you do not encounter this issue in the next login.
Regarding the issue you are facing, after we are logged in, gmail shows certain information about our account on the top like email address, etc. So you can spy any one of that element. In your diagram read the value of that element. If your diagram is able to fetch the email Id from that element without any error then that means it is already logged in.
If you are not logged in then BP may throw an error like "no element matched the query terms". This means, that Email Id element is not present on that screen and the person is logged out from previous session.
So when BP throws this error use Exception Handling with a Recover/Resume to match the error message using the Error functions available in the Calc stage and take the necessary action as per your requirement (maybe sign out that user properly).