gmail login automation

sainiboy

New Member
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?
 

Sukesh Kumaru

Active Member
No, but make sure to logout from gmail each time you run the process or else make a setting in the IE to delete session, cookies, browsing history etc,
By doing this each time you open gmail website you have to signin everytime.
 

VJR

Well-Known Member
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).
 
Top