| || |
How can i set the Properties of object in Runtime?
For Example i have the object with the same name as well as all the properties also same... in such a situation i want to count number of objects present with same properties.... In order to do this tell me some way..
Otherwise setting the index and checking whether the element is present and incrementing the counter is it ok.... Or any other way to do this.....
Re: How can i set the Properties of object in Runtime?
As there is no 'SetROProperty', I don't think we can set the RunTime object properties.
Using Object Spy find the properties of each object. There will be atleast one unique property. Atleast either x or y coordinates will be different.
Now using SetTOProperty change any one test object property Browser("..").Page("..").Frame("..").WebElement(". .").SetTOProperty "text", "xyz"
Try by enhancing the below code:
Set WebObj = Browser("..").Page("..").Frame("..").WebElement(". .")
Set Props = WebObj.GetTOProperties
PropsCount = Props.Count
For i = 0 To PropsCount - 1
PropName = Props(i).Name
PropValue = Props(i).Value
MsgBox PropName & " = " & PropValue
Not sure whether it works or not,but, you can try on your application.