Hi,
if this is the case you're better off implementing a StepMonitor.
You may want to have a look at the SeleniumStepMonitor in the
jbehave-web-selenium module, which uses a ContextView to broadcast the
step being executed.
You can adapt it to your usecase.
Cheers
On 10/06/2013 16:44, Jie Zhang wrote:
Hi Mauro,
Thanks for follow up. But my goal is not to output to the default
html/text report page, I need to get the step string (as a var) value,
then I can print it on javascript alert window.
I see the StoryReporter.successful(String step) just print the
step str on the default report page, and its return type is void, so
how can I get the step str value?
I'm not sure if I explained my stuck clearly to you, if my
understanding is wrong, pls correct me, thank you very much and
waiting for your help out.
Kind Regards,
-- Brian
On Sat, Jun 8, 2013 at 7:55 AM, Mauro Talevi
<[email protected] <mailto:[email protected]>> wrote:
That's what the StoryReporter does.
In particular, StoryReporter.successful(String step) will provide
you the successful step that's just been executed.
Have a look at CustomHtmlOutput in the jbehave-core-example for an
example of how to setup a custom reporter.
Cheers
On 07/06/2013 21:20, Jie Zhang wrote:
Hi Mauro,
I got a mission to finish by using JBehave.
Do you know how I can get the "step" 's name (its
context/text) so I can print it. Eg:
*Given I goto 'www.google.com <http://www.google.com/>'*
So what I want is I can get the "*I goto 'www.google.com
<http://www.google.com/>'*" text value, so I can print it.
Is there a JBehave API, class, method that we can use to do
this task?
Thank you and very appreciated if you can help me out!
Brian