Forum Discussion

gdave's avatar
gdave
Regular Contributor
8 years ago

Object Spy & Check Object Property

My 'checkobjectproperty' test fails every time and I get error message as 'Unable to verify a value with the property check point'. I am not very sure what I am doing wrong here so your help will be much appreciated.

 

I have attached a screenshot of my Object Spy which clearly states that wText is 'PUPInvestorReportMainJob' which is the property value which I have set but it still fails.

 

Script is given below:

aqObject.CheckProperty(Aliases.TransactConsole.FormTransactConsole.PageControlTransact.TabSheetJobManager.omFormJobManager.JMPageControl.TabSheetJobs.cxJobManagerGrid.TomGridSite.TcxMaskEdit3.TcxCustomInnerTextEdit, 'wText', cmpEqual, 'PUPInvestorReportMainJob');

 

Please note that our system under test is designed in Delphi. Thanks

  • What happens if you try a Property Checkpoint keyword test on the same object?

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Another possibility: You've given us the code for doing the actual checkpoint... however, what is going on immediately preceding that?  The reason I ask is that the component whose property you're checking (Aliases.TransactConsole.FormTransactConsole.PageControlTransact.TabSheetJobManager.omFormJobManager.JMPageControl.TabSheetJobs.cxJobManagerGrid.TomGridSite.TcxMaskEdit3.TcxCustomInnerTextEdit) MIGHT not actually exist at the time you're doing the checkpoint.  In other words, if the object doesn't exist, the property doesn't exist... and you can't do a checkpoint against it.

      Now, understandably, you can do an object spy and see the property and the object, however, in the course of running the tests, keep in mind that automation runs CONSIDERABLY faster so, when you perform an action, there may be a delay before the next step can actually be executed.

      What I would do is try adding a check before your checkpoint call to WaitAliasChild on the text box.  Wait for it to be present before you attempt the checkpoint.  Once it comes back and is ready to be accessed, then do your check point.

    • gdave's avatar
      gdave
      Regular Contributor

      Hi Marsha

       

      I tried it as keyword test and it fails the checkpoint again.

       

      I have attahed the word.doc with further screenshot based on keyword test.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Check my earlier response.  The reason the check point is failing is because the object you are trying to access doesn't exist at the time the checkpoint code is called.  There is a timing issue involved here.  You need to detect whether or not the object exists before you attempt the checkpoint.  The clue is in "Stub object"... that is what TestComplete passes back to something if the initial object can't be found.