Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to click only unread mails in Gmail using vb script
#11
Not Solved
im getting "General run error"


Attached Files Image(s)
   
Reply
#12
Not Solved
Hi, I am also on the same boat just want to read only unread email, I can read by passing the subject text but I wan QTP to find unread email and read it, Please help me to think in that direction..

Below code read email by passing text as validation code which is already read by qtp, i can change the text to read unread mail but thats not good approach.

Code:
iRows = Browser("opentitle:=Gmail.*").Page("micclass:=Page").WebTable("class:=F cf zt").GetROProperty("rows") 'get total number rows in webtable
msgbox iRows

' reading email using the cell row text as Validation code
If  Browser("opentitle:=Gmail.*").Page("micclass:=Page").WebTable("class:=F cf zt").Exist   Then
    iRow =  Browser("opentitle:=Gmail.*").Page("micclass:=Page").WebTable("class:=F cf zt").GetRowWithCellText("validation code")
    msgbox "Row number in webtable is " & iRow & " for passed text as validation codefrom email subject"
        With Browser("opentitle:=Gmail.*").Page("micclass:=Page").WebTable("class:=F cf zt")
            Setting.WebPackage("ReplayType") = 2   '2-Runs mouse operations using the mouse
                .ChildItem(iRow, 5, "WebElement", 0).Click
            Setting.WebPackage("ReplayType") = 1 '1-Runs mouse operations using browser events
                Reporter.ReportEvent micPass,"Check Mail","Email is found and read"
            End With
End If
Reply


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

Forum Jump:


Users browsing this thread: 2 Guest(s)