Forum Discussion

BillA603's avatar
BillA603
Contributor
10 years ago

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 i...
  • BillA603's avatar
    BillA603
    10 years ago

    Here is what I ended up using:

     

     Log.Message(aqObject.GetPropertyValue(Aliases.options.wndFNWND3110, "WndCaption"), "")

     

    Thanks

  • HKosova's avatar
    HKosova
    10 years ago

    @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.

     

    property-syntax.png