Forum Discussion

joaobc's avatar
joaobc
Occasional Contributor
5 years ago

Two text boxes associated with a label caption, but in one the property is blank

Hello, here is an image of my application showing the LabelCaption Última Alt. and the two fields that I would like to record the data:

Analyzing through the object browser the two fields (date field and time field), I present here the prints of both. For the time field, it comes with a blank value in the label caption property

 

I already tried to use the aqObject.SaveObjectSnapshotToFile () method to save the two fields in a text file and try to use another editor to compare, because as far as I know, the test complete itself does not provide resources to compare, in this case, two VCL Object and see what field properties are common or help to find the fields that are associating with that LabelCaption

 

I already associated it a while ago with the Top property, which if I'm not mistaken is the vertical position of the window, however if it has two columns, this property will no longer help

 

In such a situation, how to proceed?

Thanks.


EDIT: before someone ask me why?
The goal is from a parent, search the children who have the property Label Caption = Última Alt. and store the property Text in a javascript object

  • Will it always be a date time pair that you are looking for?

    And if the answer is positive then this will be a special case that your test code must handle.

     

    P.S. Well, to keep your test code to remain generic, you may talk to developers and ask them to introduce a new hidden label and link this label to time field. Though it is up to you to estimate the chances your request will be accepted by Development and the time it will take to implement it.

     

  • Well, the problem you have is that even though you look at those two fields and say "date and time are both UltimaAlt", in reality, they are not.  The Object Browser is telling you that the UltimaAlt label belongs to the date field and the time field has no label.

     

    Will it always be a date time pair that you are looking for?

     

     

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Will it always be a date time pair that you are looking for?

      And if the answer is positive then this will be a special case that your test code must handle.

       

      P.S. Well, to keep your test code to remain generic, you may talk to developers and ask them to introduce a new hidden label and link this label to time field. Though it is up to you to estimate the chances your request will be accepted by Development and the time it will take to implement it.

       

      • sonya_m's avatar
        sonya_m
        SmartBear Alumni (Retired)

        Thanks a lot, Marsha, Alex.

         

        joaobc do these replies answer your question? If so, please mark the best one as a solution.