07-09-2009, 05:39 PM
Hi Rajesh,
I think you know the basic use with 'SetToProperty' (Which will set the Test Object property with user defined property) and one more thing we have to keep in mind is this will work/show affect only in that particular run (but not affect/chage the Test Object properties in OR).
Here i have taken the Google page for example:
Please open Google page and add "Google Search Edit box" to the OR and then execute the following LOC.
Pls check out the property of Web edit before and after the execution (It will be the same in OR).
Let me know if you need any more info.
Thanks,
Sridhar
I think you know the basic use with 'SetToProperty' (Which will set the Test Object property with user defined property) and one more thing we have to keep in mind is this will work/show affect only in that particular run (but not affect/chage the Test Object properties in OR).
Here i have taken the Google page for example:
Please open Google page and add "Google Search Edit box" to the OR and then execute the following LOC.
Code:
'This will return the name property value of Google Search editbox ("q")
msgbox Browser("Google").Page("Google").WebEdit("q").GetTOProperty("name")
'This will set the property value.
Browser("Google").Page("Google").WebEdit("q").SetToProperty "name","GoogleSearchBox"
'This will validate the changes that we have made to the name property
msgbox Browser("Google").Page("Google").WebEdit("q").GetTOProperty("name")
Pls check out the property of Web edit before and after the execution (It will be the same in OR).
Let me know if you need any more info.
Thanks,
Sridhar