Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

how find no unread and emails in a gmail

View previous topic View next topic Go down

how find no unread and emails in a gmail

Post by viresh.sb on Sun Apr 08, 2012 3:40 pm

Hi All ,


How to find the no of email s in gmail or yahoo mail ? is there any direct API to find it in selenium API

Unread/read.

finding 2 or 3rd element in a drop down/

Regards
Viresh SB
9980867000

viresh.sb
Active particpant
Active particpant

Posts : 19
Join date : 2011-03-21

Back to top Go down

Re: how find no unread and emails in a gmail

Post by Adviser on Tue Apr 10, 2012 1:38 pm

hi,

There is no API present to verify email functionality, you have to write your own code for that.

1 to check nmuber of emails:
create a xpath where number of mails in inbox show. get its text and verify.

2. to check unread mails:
traverse to each row via xpath and check the message. If it is coming in bold, it's unread else readed.
3. regarding element in drop down:
create a xpath for drop down list. get total number of elements and then fetch any values

For commaands used to get the above operation performed refer seleneium API. All commands availiable in that

Best of luck.

Bye

_________________
Spread Your Knowledge About Selenium Tool.

Administrator
Email: selenium.discussion.thread@live.com
Forum: http://seleniumforum.forumotion.net

Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

Re: how find no unread and emails in a gmail

Post by mckiranlieutenant007@gmai on Wed May 08, 2013 4:24 pm

It involves checking any of the mail attributes such as FROM, SUBJECT etc.

In INBOX, traverse through either FROM or SUBJECT field and check if they have CSS style "font-weight:bold" OR you can verify if that element has a class that applied this BOLD style.

Example: XPath of FROM field which is bold'ed (Un-Read) is
Code:
//table/tbody/tr[1]/td[5]/div[@class='yW']//span
Now, if you can loop in such a condition where the Class of span element is 'zF' then count++ if the condition is true.

A similar example to read and show the UN-Read mails is explained at http://www.seleniumhq.in/2013/05/read-first-few-un-read-mails-using.html

mckiranlieutenant007@gmai

Posts : 4
Join date : 2013-04-22

Back to top Go down

Re: how find no unread and emails in a gmail

Post by mckiranlieutenant007@gmai on Wed May 08, 2013 5:39 pm

This is the exact selenese code that gets the unread count of all folders and shows in an alert.

Code:
store | //div[@class='LrBjie']/div/div[ | target1
store | ]/div/div/div/span/a | target2
store | 1 | i
store | true | present
store |  | countsAll
while | ${present}==true |
storeEval | storedVars['target1']+storedVars['i']+storedVars['target2'] | target
echo | ${target} |
storeText | javascript{storedVars['target']} | counts
storeEval | storedVars['countsAll']+'  $  '+storedVars['counts'] | countsAll
echo | ${countsAll} |
storeEval | parseInt(storedVars['i'])+1 | i
storeEval | storedVars['target1']+storedVars['i']+storedVars['target2'] | target
storeElementPresent | javascript{storedVars['target']} | present
echo | ${present} |
endWhile |  |
storeEval | javascript{alert(storedVars['countsAll'])} | countsAll

More posts available at http://www.seleniumhq.in/


Last edited by mckiranlieutenant007@gmai on Wed May 08, 2013 5:41 pm; edited 1 time in total (Reason for editing : Uploading Image)

mckiranlieutenant007@gmai

Posts : 4
Join date : 2013-04-22

Back to top Go down

Re: how find no unread and emails in a gmail

Post by Sponsored content Today at 4:49 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum