11-20-2009, 06:45 AM
(This post was last modified: 11-20-2009, 07:15 AM by narayan1975gmail.)
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", "html tag:=span", "outertext:=all").Click
Browser("title:=Gmail.*").Page("title:=Gmail.*").webelement("Innertext:=delete forever").Click
error at line
Code:
Browser("title:=Gmail.*").Page("title:=Gmail.*").webelement("Innertext:=all", "html tag:=span", "outertext:=all").Click
The "[ WebElement ]" object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the object.
What else properties I can give to make it unique?
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", "html tag:=span", "outertext:=all", "x:=235", "y:=161").Click
Browser("title:=Gmail.*").Page("title:=Gmail.*").webelement("Innertext:=delete forever", "x:=188", "y:=136").Click