Forum Discussion

Herman's avatar
Herman
Contributor
13 years ago

Failing property test while both the expected and actual value of the Enabled property are true.

I'm trying to develop a test script to verify that menu items are correctly enabled and disabled. The tests fail with the following additional information.



Object:

Property: Enabled

Expected value: true

Actual values: true



The Delphi script code (after removing some statements) leading to the above is:



procedure VerifyPrivileges(Menu, IsVisible, IsEnabled); forward;

.

.

VerifyPrivileges(Aliase.frmMain.mnuHelp, true, true);

.

.



procedure VerifyPrivileges(Menu, IsVisible, IsEnabled);

begin

  log.message(Menu.name); // The name of the object is correctly reported.

// Other statements commented out

//

  aqObject.CheckProperty(Menu, 'Enabled', cmpEqual, IsEnabled);

end;



Note:

The tested application is written in VB6.

I use TestComplete 8.6.

3 Replies

  • I made a typo (Aliase instead of Aliases)in the next statement:



    VerifyPrivileges(Aliases.frmMain.mnuHelp, true, true);
  • As a work-around I now use



    if Menu.Enables = IsEnabled then

      ...

    else

      ...
  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Herman,



    Thanks for bringing this up to our attention! It's a bug in property checkpoints, and it will be fixed in the next TestComplete release.



    Meanwhile, you can use the If comparison as a workaround.

    Sorry for the inconvenience.