Modify property value of an object in QTP
How to modify the property value of an object in QTP?
I have used the following script but I am gettiing empty in the message box.Plz help me.
var=Browser("Yahoo!").Page("Yahoo!").Link("Mail").setToproperty ("name", "newmail")
msgbox var
thanks in advance
Re: Modify property value of an object in QTP
[QUOTE=kishchilukuri;29039]How to modify the property value of an object in QTP?
var=Browser("Yahoo!").Page("Yahoo!").Link("Mail").setToproperty ("name", "newmail")
thanks in advance[/QUOTE]
setToProperty("name:=newmail")
Regards,
Nawab
Re: Modify property value of an object in QTP
Hi there,
Try this code,
var = Browser("Yahoo!").Page("Yahoo!").Link("Mail").GetTOProperty("name")
msgbox var
'Code to assign new value to the property
Browser("Yahoo!").Page("Yahoo!").Link("Mail").SetTOProperty
"name", "Newmail"
'Code to fetch the new value
var = Browser("Yahoo!").Page("Yahoo!").Link("Mail").GetTOProperty("name")
msgbox var
Regards,
Tina Mahajan.