Forum Discussion

pdhuwalia's avatar
pdhuwalia
New Contributor
13 years ago

Help with Property CP fails - TC 8.6

Hi, I am trying to create a check point to check the number of items in the drop  down and compare it to a variable with a stored value. It fails everytime, even when the values are same. My code sample is below,let me know how can it be corrected.



Call aqObject.CheckProperty(ObjectUnderTest, "wItemCount",0, var1)



Further more, I got the item count from the same drop down and then did a compare to the retrieved value,this fails too.



count = ObjectUnderTest.wItemCount

Call aqObject.CheckProperty(ObjectUnderTest, "wItemCount",0, count )



Additional Info on the error I receive : 

" Property: wItemCount 

  Expected value: "6" 

  Actual value: 6 



What am I missing here?



Thanks,

Priya













1 Reply

  • Hi Priya,



    It looks like you're facing a known issue with property checkpoints in TestComplete 8.60 where the checkpoint fails if the expected value is specified using a variable instead of a hard-coded value. The issue is fixed in TestComplete 9.



    To avoid the issue in TestComplete 8.60, you can either use a hard-coded value instead of the variable:



    or perform the check using an If statement instead of the checkpoint:

    If ObjectUnderTest.wItemCount = var1 Then

      Call Log.Checkpoint("The property checkpoint passed. wItemCount equals " & var1)

    Else

      Call Log.Error("The property checkpoint failed. wItemCount = " & ObjectUnderTest.wItemCount & ", the expected value is " & var1)

    End If