Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to click only unread mails in Gmail using vb script
#1
Not Solved
Thanks in Advance!!

would any one help me in answering or guideing me to this question
how to write a vb script code with QTP to click on the only unread E-mails from gmail or yahoo.
Reply
#2
Not Solved
Again, it would be better if you can come up with the issue you are facing while scripting/recording/running.
We do not encourage giving full solutions as such. The expectation is that user should try to come up with his/her own solution after getting a hint for approaching the problem.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Not Solved
[quote=Ankur]
Again, it would be better if you can come up with the issue you are facing while scripting/recording/running.
We do not encourage giving full solutions as such. The expectation is that user should try to come up with his/her own solution after getting a hint for approaching the problem

Hi Ankur,

Iam not looking for a solution but looking for approach !
how do u write a script or approach to click on only unread mails in gmail.. If you record clicking on unread mails and play it back the Qtp will not recognise the unread mails again so how do u make QTP understand that
Reply
#4
Not Solved
ok...new question sounds better.

The reason why qtp doesnt recognize, if you replay back the recorded script is because the no of emails get changed everytime right?

You can use regular expression on those (changing) numbers.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#5
Not Solved
tnxs Ankur,

Let me try it out!!!
Reply
#6
Not Solved
Ankur!

I think these regular expressions are used for check points...but there is a different logic invloved i guess to click onto this unread gmails.i think its not so easy as u r thinking?
did u try it any time anything of this sort.

If yes plz do guide me!!!..........
Reply
#7
Not Solved
sorry for the typo!

if u click onto the unread Emails in the Gmail or yahoo....
Reply
#8
Not Solved
2nd Hint: Take a look at regular expression forum and read all threads in it, probably you can find a way to reach your answer.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#9
Not Solved
Hi,

I wrote a small piece of code to check unread mails in gmail.
try it.

Code:
Set excel = CreateObject("Excel.Application")
excel.Workbooks.Open("C:\gmail.xls")
Set sheet = excel.Sheets("Sheet1")

Set objLink = Description.Create()
objLink("html tag").value = "A"

Set objSearch = Browser("title:=Gmail.*").Page("title:=Gmail .*").ChildObjects(objLink)
row = 1
For i=35 to 84 'There are many links but mail (subject) link starts from index 35. Presuming that there are 50 mails per page

     str = objSearch(i).getROProperty("innerhtml")

     If instr(1,str ,"<B>",1)>0 Then 'identifies unread mail by checking whether the font is bold
        sheet.cells(row,1) = objSearch(i).getROProperty("innertext") ' Writes the subject of unread emails in excelsheet from row.
        row=row+1
        j=j+1 'Counts total number of unread mails
     End If

Next

excel.ActiveWorkbook.Save
excel.Quit
msgbox "You have " & j &" unread mail(s)"
Reply
#10
Not Solved
im getting "General run error"
[attachment=1135][attachment=1135]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to delete particular mails in Gmail using QTP rajkumarsm 1 4,164 10-06-2014, 07:03 PM
Last Post: rajkumarsm
  Right Click On a Image and Click on a Link in WebElement RameshKrishnan 4 5,402 07-10-2013, 04:13 PM
Last Post: RameshKrishnan
  Delete Gmail email newqtp 4 4,745 07-05-2013, 02:12 PM
Last Post: Staff
  Total no of mail in gmail excellentpawan 2 3,146 07-05-2013, 01:56 PM
Last Post: Staff
  gmail signout dropdown thru DP zakshah.12 0 2,305 03-05-2013, 07:47 AM
Last Post: zakshah.12

Forum Jump:


Users browsing this thread: 1 Guest(s)