09-02-2014, 07:57 AM
Hi, Need a script to delete particular mails from gmail using QTP.
Im using QTP 10, IE7.
Sample code: But it is not working properly. Thanks in advance.
Im using QTP 10, IE7.
Sample code: But it is not working properly. Thanks in advance.
Code:
For i = 1 to 10
A = Browser("Inbox.*").Page("Inbox.*").WebTable("Click to teach Gmail this").GetCellData(i,5)
Expected = " me"
Actual = Split(A,",")
'Print Actual(1)
If Expected = Actual(1) Then
'print "Passed"
Set B = Browser("Inbox.*").Page("Inbox.*").WebTable("Click to teach Gmail this").ChildItem(i,1,"WebElement",0)
B.Set "ON"
'Browser("Inbox.*").Page("Inbox.*").webelement("micclass:=WebElement","class:=T-Jo-auh","height:=15","index:=0").click
'Browser("Inbox.*").Page("Inbox.*").webelement("class:=T-Jo-auh","index:=1").click
Else
print "Failed"
End If
Next