Forum Discussion

tengel's avatar
tengel
Contributor
13 years ago

Intermittent Click Response

I have an object that is always found and always clicked on as reported by the log and Log.Messages, but the application does not always respond as if it is clicked on.  I am using the following script.  The FindOrderUnitIcon() definitely returns the correct object. 


var OrderUnitIcon =MaximoMiscFunctions.FindOrderUnitIcon();



Delay(1000);    // I have more success with this here than not



OrderUnitIcon.Click();



Log.Message("OrderUnitIcon clicked");    // this is in addition to the autolog



If I manually click on the OrderUnitIcon it always works.  Other icons work without any problems.  How can I get it to reliably click?





 


1 Reply

  • Hey Tom.



    Have you tried using the Enabled Property ?



    I haven't tested this, but perhaps something like:



    Do While Not (OrderUnitIcon.Enabled)

      aqUtils.Delay(250)

    Loop



    Hope this helps!