Forum Discussion

crb's avatar
crb
Occasional Contributor
13 years ago

Recording a test on a .NET product that starts a Matlab process

Does anyone have experience in testing a GUI product that spawns a Matlab process (or any third party process for that matter.)?

Seems like TestComplete always has a problem during playback with the console window of the Matlab process.

I get an "object does not exist" error for the object that represents the Sys.matlab.wndConsoleWindowClass.

Thanks.

5 Replies

  • crb's avatar
    crb
    Occasional Contributor
    Actually, I have a new question.

    This again involves recording a (keyword) test of a GUI that forks a matlab process.

    I have situation where once a button is clicked, it forks a matlab process that has its own wnd console and other windows.

    The button becomes disabled once it is clicked and becomes enabled when matlab process is done.

    I don't care to test the matlab windows, so I would like to ignore everything that matlab does and then have the test

    pick up again once the button is enabled.

    It looks like on the button I want to key off of, you can specify the Enabled[Get] property, but the docs say that the method(property)

    is not available. So, I can't use this feature?
  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Chris,


    but the docs say that the method(property) is not available.


    What do you mean? Which documentation topic says that?


    Anyway, if the Enabled property is available for your button, you can use it in your tests. To delay your test execution until the button in your tested application changes its state, you can use the WaitProperty method or implement a loop.


    The WaitProperty method pauses the test execution until the specified property becomes equal to the specified value. To call the WaitProperty method from a keyword test, you can use the Call Object Method operation.

    On the Specify Object page of the Call Object Method operation wizard, you need to specify your button, on the Specify Method or Property page, you need to select the WaitProperty method, and on the Operation Parameters page, you need to set the WaitProperty method's parameters - the name of the property whose value you want to check and the value you need to wait for before continuing the test execution.


    To implement a loop in your keyword test, you can use the While Loop operation. As the condition checked on each iteration, specify the needed button state. The loop will test that condition until it becomes true.


    To learn more about how to pause a test until the object state changes, please see the Waiting For Object State Changes Help topic.


    Please let us know if this information does not help or if you have additional questions.

    Thank you.

  • crb's avatar
    crb
    Occasional Contributor
    Thank you.

    I did end up using a While Loop to solve my problem.



    As far as the Enabled[Get] message  --- At one point, I wanted to do an On-Screen Action on an object,

    and in the list for Specify Method or Property, I saw:



    Enabled[Get]

      This method(property) is not available at the moment.  The Code Completion window displays information that was stored earlier.



    Maybe I right-clicked-on or dragged the target to the wrong object.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Enabled[Get]

      This method(property) is not available at the moment.  The Code Completion window displays information that was stored earlier.



    Maybe I right-clicked-on or dragged the target to the wrong object.




    No.  All that means is that the object that you're working off of as stored in the NameMapping repository knows that, at some point in time the Enabled property existed and the Get method existed for that property.  If you have you object up and visible on screen while you're coding, that message would not show up.