Forum Discussion

rushikesh's avatar
rushikesh
Contributor
8 years ago

How to control spin control buttons in test complete?

How to control spin control buttons in test complete?

In application which I am testing, spin control buttons are present in dialog box to enter values.

 

There are two buttons in one spin control, one to increase the value and other to decrease.

Problem is test complete is recognizing both the buttons as single object.

 

My requirement is to control both spins (increase and decrease).

How can I do it ?

3 Replies

  • What language is the application you're testing in?

     

    I have Spin controls in Delphi. Two types. A single button type, and a dual button type. The dual button type presents as two child items which I just click. The single object type simply has "Up" and "Down" methods, so I call those. They're both simple to work with. Have you checked the available methods for it?

     

    Knowing the language you're dealing with and the class name of the control would help ....

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    rushikesh wrote:

    How to control spin control buttons in test complete?

    In application which I am testing, spin control buttons are present in dialog box to enter values.

     

    There are two buttons in one spin control, one to increase the value and other to decrease.

    Problem is test complete is recognizing both the buttons as single object.

     

    My requirement is to control both spins (increase and decrease).

    How can I do it ?


    Another thing you can do...

    ...again, not that I would keep the recording as is, but try doing a quick "record" against the component, doing both an "up" and a "down" on it.  How does TestComplete generate the script or keyword test against it? Is it using the methods as described by Colin_McCrae or is it resolving the buttons in some other way?  If it's a supported spin control in TestComplete, it should resolve the spin edit properly and you can then use that as a template for how to build your test.