11-20-2009, 11:43 AM
Code:
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webedit("name:=Email").Set "xxx"
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webedit("name:=Passwd").Setsecure "xxx"
If browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").WebCheckBox("name:=PersistentCookie").GetROProperty("Checked") then
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").WebCheckBox("name:=PersistentCookie").Set "OFF"
else
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").WebCheckBox("name:=PersistentCookie").Set "ON"
end if
browser("name:=Gmail: Email from Google").page("title:=Gmail: Email from Google").webbutton("name:=sign in").click
wait(10)
Browser("title:=Gmail.*").Page("title:=Gmail.*").link("Innertext:=Trash").Click
Browser("title:=Gmail").Page("title:=Gmail.*").webelement("Innertext:=all", "outertext:=all", "x:=235", "y:=161").Click
Browser("title:=Gmail").Page("title:=Gmail.*").webelement("Innertext:=Delete forever", "outertext:=Delete forever", "x:=188", "y:=136").Click
Now the issue is with last line....QTP doesnt throw any error ,but it doesnt delete any