11-26-2010, 02:08 PM
(This post was last modified: 11-26-2010, 02:12 PM by ngocvo3103.)
Hi guys,
Sorry for this lately reply because I was so busy in last few days. I'm happy to share with you guys my solution as below
Sorry for this lately reply because I was so busy in last few days. I'm happy to share with you guys my solution as below
Code:
Public sub s_Delete_Mail (strSubject)
'Go to inbox
Set yahoo = Browser("name:=^((Compose\sMail\s\-\s)|(\(\d+\sunread\)\s)|(Inbox\s(\(\d+\))?(\s)?\-\s))?Yahoo!\sMail(\:\sThe\sbest\sweb\-based\semail!)?$").Page("micclass:=Page")
yahoo.Link("name:=^Inbox\s\(\d+\)$").Click
Set inbox = Browser("name:=^((Compose\sMail\s\-\s)|(\(\d+\sunread\)\s)|(Inbox\s(\(\d+\))?(\s)?\-\s))?Yahoo!\sMail(\:\sThe\sbest\sweb\-based\semail!)?$").Page("micclass:=Page")
Set inboxtable = Description.Create
inboxtable("micclass").Value="WebTable"
inboxtable("text").Value="^Inbox.*$"
Set checkbox = Description.Create
checkbox("micclass").Value="WebCheckBox"
Set checkboxes = inbox.WebTable(inboxtable).ChildObjects(checkbox)
row = inbox.WebTable(inboxtable).GetRowWithCellText(strSubject)-1
checkboxes(row).Set "ON"
inbox.WebButton("name:=Delete","html id:=top_del").Click
End Sub