Forum Discussion

charles_edwards's avatar
charles_edwards
New Contributor
9 years ago

Error when clicking two buttons in serial order

I am doing the following:

 

function Test1()

{

var singleCaptureView;

singleCaptureView = Aliases.Auto2.InteractiveAcquisition;

singleCaptureView.ObjectiveSelect.buttonObjective40x.ClickButton();

//delay(2000);

singleCaptureView.LightSource..ChannelButton.ClickButton();

}

 

If I leave the delay out, I get the following:

Possible reasons:
1. The application stopped responding.
2. The application was compiled incorrectly (see the Open Applications topic in the help system).
3. An error occurred in TestComplete.

Technical information:
378 0x84000001 () .

Tested object:
Aliases.Auto2.InteractiveAcquisition.LightSource..ChannelButton

 

In both cases (with/without the delay)  the ChannelButton is clicked and the proper action is executed.  I have tried delaying the ChannelButton click until all parameter changes on the Objective button are updated but that has not worked.  The application itself does not throw an error, only TestComplete.

2 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    I suspect clicking objective button changes something in singleCaptureView

    so the system unstable ..but after 2 sec things are clear

    • charles_edwards's avatar
      charles_edwards
      New Contributor

      I( agree that something is unstable.  Any suggestions on finding what it is and putting a wait_until_stable in rather than an arbitrary delay.  I was always taught that arbitrary delays were bad programming practice.