If you are using jbehave-web and its Selenium integration - please make sure you are using Selenium's Wait functionality. For other asynchronous processing, I prefer to have a polling step, much like Mauro described but I'd use it to refer to what results you are polling for.
When the user makes asynchronous call And the call completes (within 5 seconds) Then ... Replacing that with what the "call completes" actually means. You will typically implement that step with a polling method. Brian ----- Original message ----- From: Mauro Talevi <[1][email protected]> To: [2][email protected] Subject: Re: [jbehave-user] Asynchronous Calls handling _ flickering scenarios Date: Wed, 25 Apr 2012 17:36:44 +0200 Hello, no, there is nothing built-in for this, as users can implement (typically in the step executing the call or in a separate step) their own sleep patterns using the standard JDK TimeUnit functionality. Implementing a separate step is more readable and communicative, thus preferable. E.g. When the user makes asynchronous call And the users waits for 5 seconds Then ... Cheers On 25/04/2012 17:23, Bhuvnesh Pratap wrote: Hello people, I have this scenario in my mind where one of the step makes an asynchronous call at the GUI (this call is supposed to persist some data in to the database ) and then executes the next step present in the scenario which actually makes some DB call over the data that has been just changed by the previous asych. call . In such a case we would like to implicitly wait for next step to begin execution or wait till some event happens . Do we have such a feature built in our JBehave to take care of such a situation ? Thanks, Bhuvnesh Pratap References 1. mailto:[email protected] 2. mailto:[email protected]
