Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delete Gmail email
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
Code:
If  Browser("name:=.*").page("Title:=.*").webtable("class:=Bs nH iY").Exist   Then
Browser("name:=.*").page("Title:=.*").webelement("Class:= T-I J-J5-Ji nX T-I-ax7 T-I-Js-Gs ar7").Click
End If

this code goes through the successfully but doesn't click the trash icon. I have tried all possible delete method.

Any suggestion..I am going to try from inbox instead of open mail itself. But suggestion for deleting email from open mail is appreciated thanks.
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Here i am trying to delete from inbox 1st email.. But no luck
Code:
With Browser("title:=Gmail.*").Page("micclass:=Page")
    .WebTable("class:=F cf zt").ChildItem(1, 1, "WebCheckBox", 0).Set "ON"
    Setting.WebPackage("ReplayType") = 2
    .WebElement("innertext:=Delete", "index:=0").Click ' gives error here
    Setting.WebPackage("ReplayType") = 1
End With

Any Suggestion will be appreciated.

I have also tried

Code:
If  Browser("name:=Gmail.*").page("Title:=Gmail.*").webtable("class:=Bs nH iY").Exist   Then
Browser("name:=Gmail.*").page("Title:=Gmail.*").webtable("class:=Bs nH iY").Webtable("class:=cf gJ").Image("class:=hA T-I-J3").Click  
' Click delete this message on the fly out
'below line of code doesn't work
'Browser("name:=Gmail.*").page("Title:=Gmail.*").webtable("class:=Bs nH iY").webelement("class:=cj", "outtertext:= Delete this message").Click

End If
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Finally I got it worked, wanted to share so that others don't waste time in looking for solution.

Code:
'delete email
Browser("name:=.*").page("Title:=.*").webelement("height:=29","index:=45").Highlight 'I had to find out the index and it was hit and trial to get the index number
Browser("name:=.*").page("Title:=.*").webelement("height:=29","index:=45").click
Set WShell = CreateObject("WScript.Shell")
WShell.AppActivate "Browser"
WShell.sendkeys("{ENTER}")
Set WShell = Nothing
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
Here is one more piece of code and it will surely work ,I have tried on IE7,IE8,IE9.There is only one change from the above code i have added the Webelement Class as ar9.* and index:=1.I hope this will help.

Code:
Browser("micclass:=Browser","name:=Your.*").page("Title:=.*").webelement("class:=ar9.*","index:=1").Highlight
Browser("micclass:=Browser","name:=Your.*").page("Title:=.*").webelement("class:=ar9.*","index:=1").click
Set WShell = CreateObject("WScript.Shell")
WShell.AppActivate "Browser"
WShell.sendkeys("{ENTER}")
Set WShell = Nothing
Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
Please ensure to include your code between [code] tags while asking or replying to questions. I have done this for you for this time.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Send automatic email notification when test run started helmzshelmz 0 1,117 04-03-2020, 07:54 AM
Last Post: helmzshelmz
  Delete Firefox history and Cookies Anupama 0 1,466 06-18-2018, 11:57 AM
Last Post: Anupama
  How to attach HTML file to Email Naresh 0 3,084 04-06-2015, 02:04 PM
Last Post: Naresh
  How to delete particular mails in Gmail using QTP rajkumarsm 1 4,200 10-06-2014, 07:03 PM
Last Post: rajkumarsm
  How to delete the cookies (1000 records) akhandesh 1 2,785 09-03-2014, 09:57 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)