In order to count the unread emails of a gmail account you need to be logged into the Gmail account and then run this script which will count all the unread email and display the no of unread emails. We will use the GetROProperty (Get Run Time Object Property) to get the no of unread emails ex Inbox (25) and then replace Inbox, (, ) with a null and then print only the number.
The reason for us to use the GetROProperty on the Inbox Link is that the count of unread mails is dynamic and so we need to get the innertext and print the unread emails. So no matter you run any number of times you will get the exact number of unread emails in gmail account. If no unread emails are there then it will print a message saying " No Unread Emails" else it will print "You have xxx unread emails in your inbox"
0 comments:
Post a Comment