Forum Discussion

martin_facchini's avatar
martin_facchini
Contributor
11 years ago

Property and Object Checkpoints Failing to Detect Missing Objects

On a fixed build, I create both an Object Checkpoint and a Property Checkpoint against a form label and its accompanying edit box (four checkpoints for the same thing, basically).  I then revert to the previous, broken build (which is missing the label and edit box), and then re-run the test script to see if the script will now fail, however, all four checkpoints pass, and do not detect that the label and edit box are missing. 

 

I now the Property Checkpoint is designed to work on “properties” of the object, and the checkpoint does work if I specify a value in the Stores to check against for the edit box (even though there is no edit box to even check against), but I don’t understand why both Object Checkpoints should fail to detect that both the label and the edit box are missing completely.



using TestComplete Version 10.50.2702.7

10 Replies

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3
    Also, you have to be careful with the properties.  You might need something like Visible or Enabled instead of Exists in your checkpoint.  
  • NisHera's avatar
    NisHera
    Valued Contributor
    How did you  "revert to the previous, broken build " I suspect still it's running on present build ...

    OR some thing missing in u r script ...
  • thnx, Marsha and Nishnatha. 



    I replaced the build and restarted the app, then re-ran the script.  the form is clearly missing the box and label in the new run.



    Yes, both Visable and Enabled were/are checked. 

  • as you can see in the attached logs (new pic), both checkpoints pass.  in the accompanying captured screen shots, the one on the right (broken build that was run) is missing the box and label.
  • I don't use keyword tests and the built in checkpoints myself but .....



    Are you sure it isn't finding an alternative editbox/label and passing the checkpoint against them? If you have the broken build loaded and try and highlight the missing object on screen, does it highlight something else?



    If this is the problem, you maybe just need to tighten up your identification properties so it can't find something else.
  •  Hi, Collin.  I did try the Object Spy as well to confirm that I wasn't picking up any erroneous objects, and it could not find the target labels/boxes on the broken build that was tested.
  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3
    Okay, could we see the contents of the two checkpoints?
  • OK, the developer who did the fix is back, and I’ve been working with him on this this morning.  We found out that both objects were there in the previous build (both with the correct Visible attribute), but they were accidently covered when a previous frame was enlarged.   The fixed build just moved the objects to another location, outside the boundary of the frame.

     

    Thanks for everyone’s help.

     

    On a side note, this poses two follow-up questions:

     

    Is there a way for TC to obtain a listing of all objects for a displayed form?  You would then be able to do a comparison for missing or misnamed controls on a later run of a script.  (The object spy only identifies one control at a time on mouse-over, and also does not uncover any hidden controls.)

     

    Is there an object property that would identify its relative position/order within a form?  I not a programmer, so I’m relatively new to controls and their properties.  
  • For anyone else having this problem, once the control's whereabouts are defined,  you can then create checkpoints based on other object properties, such as “Top”, and “Left”, for example.  If at some future date the object gets moved or accidently gets removed, then the test script will capture the change and fail. 

     

    Even if the control gets covered up, test script’s Additional Info panel will confirm that the object is still there, and not missing (even though the control is not visible to the user).  From this you can deduce that your object(s) are being covered up.
  • VisibleOnScreen property may also have verified this?



    Assuming the app has the screen to itself at runtime, this property should indicate whether or not TestComplete can actually "see" the control. Rather than Visible which is a setting of the control, but it can still be hidden.



    Use carefully if you're going to rely on it. You need to make sure you're controlling screen sizes, opening things full screen, scrolling into view when required etc etc .... so it doesn't end up missing things due to how things are displayed during a run. Especially if you're running heedlessly.