Object property can be used to retrieve internal properties and activate internal methods of any .NET Windows Forms object in your application.
For example, you can set the focus to a particular button and change its caption using statements similar to the following:
Set theButton = SwfWindow(“frmWin”).SwfButton(“OK”).Object
theButton.Caption = “Yes”
The Object property is also useful for verifying the value of properties that are not available using a standard checkpoint.
When you use the Object property to retrieve arrays of structures, the Object property returns the COM wrapper of the system.array object. In your VBScript test or component steps, you can then use the system.array object to access the array members.
For example, suppose a button object in your application has a PointArray property, which is an array of Point structures. To access the first item in the PointArray property, you would use the following expression:
If the same object had an IntArray property, which was an array of integers, you would use the following expression to access the first item in the IntArray property:
Rahnuma is a technical content writer at software testing stuff. A software engineer by degree and a dynamic content creator by passion, she brings to table over 3 years of writing experience in tech niche. Combining her enthusiasm for writing and technology, she loves to share her thoughts on the latest tech trends.