Forum Discussion

loka's avatar
loka
Occasional Contributor
13 years ago

issue with Combobox Keywordtests recording

Hi,




I am facing an issue with a Combobox in an application I am testing.

Recorder does not record my selection from Combobox dropdown list. This issue is occuring in all comboboxes in this Delphi designed application.

If I chose Low-Level Procedure recording it works fine, but unfortunatly I wil be fixed to reolutions, application coordination, size and so on (which I can not use at the last end)




What can be wrong? is there anyway that I can solve this issue with?







Kind reg




Louay




3 Replies

  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)

    Louay,


    What test commands are recorded? Also, what combo box controls are you using (what vendor)?

    Perhaps, they are not supported by TestComplete, and it does not recognize them as combo box controls. To command TestComplete to recognize your controls as combo box controls, you need to change your project's properties:


    *  Launch your application and activate the form that contains the problematic combo boxes.

    *  Switch to the Object Browser and find your combo box control there.

    *  Find the WndClass property on the right and memorize (or write down) its value.

    *  Switch to the Project Explorer panel, right-click your test project there and choose Edit | Properties from the context menu. This will open the project editor and activate the editor's Properties page.

    *  Select Object Mapping on the left of the page. This will open the Object Mapping settings for editing on the right.

    *  Choose the "Win32 Controls and Windows | Combo box" control object category and add the class name of your control to the list.

    * Select File | Save from the main menu to save the changes.

  • loka's avatar
    loka
    Occasional Contributor
    Dear Alex Kuzin                   



    it works...I am realy grateful for your help :).



    Alex the next issue I have is in my "application under test" I have a timer running and i dont want to proceed to next step before this timer is stoped (wher NEXT button be Enabled). I have added a Property Checkpoint on a "Next" button to se if it is Enabled or not. But Test Complete seems it tries to proceed.

    I activate this timer by pressing a "Test" button in my "Under Test application" and this button change caption to "Stop Test" while it runs a test procedure which is variable in time.How can I make Test complete to pause undtil this button caption get changed and the NEXT button get Enabled?



    Kind Regards

    Louay

  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)

    Louay,


    As far as I understand, you want to pause the test run until the "Next" button becomes enabled and you are using a timer for this, right? In this case, there is no need to use timers. I'd suggest using the WaitProperty method. You can call it from your keyword tests in the following manner:


    * Launch your tested application and display the tested wizard.

    * Open your keyword test for editing.

    * Drag the Call Object Method operation from the operations list on the left of the keyword test editor (the operation is in the "Test Actions" category) and drop it to the appropriate place in your test. TestComplete will invoke the wizard, in which you can specify the operation's properties.

    * On the first page of the wizard, click Select On-screen object. TestComplete will display another dialog, where you can specify the test object (button) whose property you would like to check. After you close that dialog, TestComplete will show the test object name in the Operation Properties wizard (see attached image11. In your case, the object name will be different). Click Next.

    * The next page of the wizard will display a list of methods and properties of the selected object (sorted in the alphabetical order). Find the WaitProperty method in the list, select it (click it) and then click Next to continue (see attached image21).

    * On the next page, you can specify the method's parameters. The first parameter is the name of the property to be monitored, the second parameter is the property's expected value, and the third parameter is the number of milliseconds to wait. See attached image3. As you can see, the method will command TestComplete to wait for 10 seconds until the button's Enabled property is true. You can change the timeout value, if 10 seconds are not enough.


    The WaitProperty method returns true if the specified property gets the expected value within the specified wait time period. Otherwise, the method returns false. The method's result becomes the result of the Call Object Method operation. To check the operation results in your keyword test, insert the If... Then operation right after the Call Object Method operation in your test and use "Last operation result" when setting the If... Then operation's properties. For detailed steps, see Checking Operation Result.


    The Call Object Method operation is just one of possible ways to call object methods from keyword tests. You can use other methods, if you like them more. See Calling Object Methods.