I am trapped in a weird “DoubleClickAny” command. All the other DoubleClick command can work correctly except one in a script. Here are my code snippet:
The expected process is
when doubleclick on image “li_ComponentPrototype_h”, a new window prompted up, which shows the image “InitialComponentModeling/ic_DependsOn”.
The actual result is
The exception thrown out as image "“InitialComponentModeling/ic_DependsOn” can not be found. So, I think image “li_ComponentPrototype_h” has been recognized. But DoubleClick command can not work. Per my observation on the replay, it should be the problem on doubleclick since I didn’t see the prompted window.
- I guess it is timing problem because when select the failed line and click the Run Selection button in the Script Editor, doubleclick command works well. So, I tried the following methods:
- Add Wait command:
- Add WaitFor command:
WaitFor 15.0 “li_ComponentPrototype_h”
- Add a if/then:
if ImageFound(“li_ComponentPrototype_h”) then
- change the Run Option in Preference:
Here are my configuration parameters in running:
remoteWorkInterval = 5.0
StandardImageTolerance = 45
NextKeyDelay = 0.08
But of no avail at all!
What’s wrong with my script?