11-16-2010, 01:58 PM
(This post was last modified: 11-16-2010, 03:04 PM by ngocvo3103.)
Hi all,
I'm doing some exercise on yahoo mail with QTP version 10. The error message comes when I execute my script to delete email:
I've tried some other ways to solve this but it only works when I capture interface in the object repository. Can you guys please help me solve this problem with DP?. All helps are appreciated.
"Object required: 'checkbox'
Function file: D:\QTP\Training\Functions\Yahoo Dynamic Functions.vbs
Line (62): " checkbox.Set "ON"
And this is my script:
Thanks for reading.
Ngoc Vo
I'm doing some exercise on yahoo mail with QTP version 10. The error message comes when I execute my script to delete email:
I've tried some other ways to solve this but it only works when I capture interface in the object repository. Can you guys please help me solve this problem with DP?. All helps are appreciated.
"Object required: 'checkbox'
Function file: D:\QTP\Training\Functions\Yahoo Dynamic Functions.vbs
Line (62): " checkbox.Set "ON"
And this is my script:
Code:
Public sub s_Delete_Mail (strSubject)
Dim wTable1
Set wTable1 = Description.Create
wTable1("micclass").Value="WebTable"
wTable1("text").Value="^.*See.*$"
wTable1("html id").Value=""
Set inboxtable = Description.Create
inboxtable("micclass").Value="WebTable"
inboxtable("text").Value="^Inbox.*$"
Dim checkbox
row = Browser("name:=^.*Yahoo.*$").Page("title:=^.*Yahoo.*$").WebTable(wTable1).WebTable(inboxtable).GetRowWithCellText(strSubject)
Set checkbox = Browser("name:=^.*Yahoo.*$").Page("title:=^.*Yahoo.*$").WebTable(wTable1).WebTable(inboxtable).ChildItem(row,1,"WebCheckBox",0)
[b]checkbox.Set "ON"[/b]
(Click delete button)
End Sub
Thanks for reading.
Ngoc Vo