Forum Discussion

rms_1's avatar
rms_1
New Contributor
14 years ago

GUI testing for DevExpress controls' inheritors

My company uses DevExpress library for GUI development.

But all controls in our software are inheritors from standard DevExpress components.

I've tried to write GUI test (using TestComplete8) for our application with these controls but 

noticed that TestComplete unable to recognize DevExpress inheritors. 

For example, I can't get the value of the cell (wValue) of the DevExpressXtraGridView inheritor or

click on the ToolBox item fails with error message: "An error occurred while calling the "Click" method or property of the "ToolBox"

object.The object or one of its parent objects does not exist."



How to solve this problem?

If there is no opportunity to solve it with current TestComplete functionality

whether it possible to write custom extesions for TestComplete?



Thank you!

  

  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)

    Mike,


    TestComplete uses window class names to determine the control type. Your controls' class names differ from the original DX class names, so TestComplete is unable to recognize your controls as descendants of Developer Express controls. To work around the issue, change the Object Mapping properties of your test project:


    * Right-click the project node in the Project Explorer panel and select Edit | Properties from the context menu. This will invoke the project editor and activate its Properties page.

    * On the page, select Object Mapping from the tree on the left. You will see the object mapping settings on the right.

    * Expand the Developer Express Controls category. Find the needed object group in this category and then either click the Derived classes check box for the appropriate class names or add the class names of your descendant controls to the appropriate object group.


    See also Object Mapping.


    Please note that if the descendant classes change the functionality of original controls significantly, TestComplete may fail to simulate actions over your controls.

  • rms_1's avatar
    rms_1
    New Contributor


    Thanks for your answer. 


    I performed neessary mapping (by means of setting Derived Classes flag). And this really helped me to get access to the wValue property and


    thus I was able to set property checkpoint. But when I launch my test it fails with the following error:


    Unable to verify a value with the property checkpoint, because the object
    specified by the Object parameter is empty or does not exist.





























    Checkpoint parameters:
    Object: Stub object
    Property: wValue(0, 4)
    Condition: cmpEqual
    Value: Mike
    Case-Sensitive: true


    What else should I do to avoid this problem?


  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)

    Mike,


    The error means TestComplete was unable to find the object you specified. Perhaps, the tested application is not running, or the tested form is not shown on the screen, or the form does not contain the expected grid control (the control with the expected recognition properties).


    Before running the test, please ensure that the tested application is in the same state as that it was in when you recorded (or created) the test. Please check whether the tested grid control is on the form and it has the same recognition attributes as those used when creating your test (maybe the control name was changed).


    The following topic of TestComplete's documentation may help: Handling the 'Unable to Find the Object' Error.

  • rms_1's avatar
    rms_1
    New Contributor
    Thanks, Alex!

    I solved the problem by means of increasing timeout interval.