javatimeoutjemmy

Is there any maximum limit for ActionProducer.MaxActionTime in Jemmy lib?


As it is described on http://wiki.netbeans.org/Jemmy_Operators_Environment default time for ActionProducer.MaxActionTime is 10000 ms.

I need to increase it to 120000 ms and use next code:

JemmyProperties.setCurrentTimeout("ActionProducer.MaxActionTime", 120000);

And when the code is run under debugging mode the value is 120000:

enter image description here

but still I've got the next error:

"Menu pushing: (JMenuItem with text "Modules", JMenuItem with text "Corporate entity") (ActionProducer.MaxActionTime)" action has not been produced in 60005 milliseconds

Is 60000 ms a maximum value for ActionProducer.MaxActionTime?

UPDATE:

Every instance of a class implementing org.netbeans.jemmy.Timeoutable can have its own timeout values, so I checked timeout of instance that generates error

menuBar.getTimeouts().getTimeout("ActionProducer.MaxActionTime")

but the result was the same - it is 120000 seconds and still failing at 60000 seconds.


Solution

  • Despite the fact that error message states (ActionProducer.MaxActionTime)" action has not been produced in..., there is another timout that rules this action time:

    JMenuOperator.PushMenuTimeout

    Even if I set:

    JemmyProperties.setCurrentTimeout("JMenuOperator.PushMenuTimeout", 50);
    

    The error is:

    "Menu pushing: (JMenuItem with text "Modules", JMenuItem with text "Corporate entity") (ActionProducer.MaxActionTime)" action has not been produced in 51 milliseconds

    So do not belive Jemmy log messages and try to find the right timeout.