Forum Discussion

ssv's avatar
ssv
Occasional Contributor
6 years ago
Solved

Unable to access the checkbox object

I am trying to perform an upgrade tests.

In the upgrade tests dialog, there are 4 objects.

 

The first one is "Uninstall earlier version", which is a checkbox, eventhough the object mapping says Button, with the object mapping of "Window("Button","",1)", the object Type is CheckBox

 

Then we have three buttons, "Back", "Next" and "Cancel", their object Types are Button. The BACK and NEXT button are disabled untill we have checked the "Checkbox" of "Uninstall earlier Version". When trying to access the "uninstall earlier version", the button of "Cancel" is clicked.

 

To be put in more detail, if i consider the "uninstall earlier version" as a button,  "mainDialog.Window("Button", "", 1)", then the cancel button object is clicked, eventhough the mapped object name of cancel button is Button("Cancel").

 

And if i consider it as a checkbox object, i get the "Invalid procedure call or argument", the code for that checkbox goes as follows, 

 

If mainDialog.Window("Button", "", 1).wState = cbUnchecked Then
        mainDialog.Window("Button", "", 1).wState = cbChecked
End If

 

Any help on solving this problem is highly appreciated.

 

Thanks in advance!

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Using the object spy, please post the full advanced list of the properties and methods of the checkbox object.

    Just as a side note: "mapped" is a particular term in TestComplete which means that an object is identified within the NameMapping module of the tool.  So... to clarify, when you say "the object mapping says Button", do you mean that you have something mapped in NameMapping for this object?

  • ssv's avatar
    ssv
    Occasional Contributor

    I have attached the screenshots