Can Window Caption text value be logged?
I would like to write the Caption of the Window at the beginning of my test.
I have played around with the Property Checkpoint and can compare the Caption but cannot figure out how to reference it in a Log.Message() call.
I am working with a PowerBuilder app and the object is currently referenced as
Alias.MyAppName.wndFNWND3110.
I cannot figure out how to specify the WndCaption property in a Log call.
I appreciate any assistance.
Here is what I ended up using:
Log.Message(aqObject.GetPropertyValue(Aliases.options.wndFNWND3110, "WndCaption"), "")
Thanks
@NhGovtWorker wrote:
Here is what I ended up using:
Log.Message(aqObject.GetPropertyValue(Aliases.options.wndFNWND3110, "WndCaption"), "")
That works too, but it's just easier to refer to object properties and methods directly using the dot notation, as Alex suggested:
Log.Message(Alias.MyAppName.wndFNWND3110.WndCaption)
Tip: You can see the property usage syntax in the Object Browser or Object Spy. Select the needed object and property, and look at the string at the top. You can copy and paste this string to your tests.