title: cucumber + java :Passing paramater returned in step1 to step2
body: <p>I am new to cucumber. We have below use case for UI automation through cucumber.</p>
  
  <p>Please consider below example.</p>
  
  <p>in TestNg,</p>
  
  <pre><code>@Test {"formname"}
  public void createAndSearchForm(String formName)
  {
      //In below  step, it create form by name (formName-timestamp) and return   the formname. e.g. it create form and return "formname-06042016184426"
      // In this method we create form name by appending time stamp to formname passed to method. Since application didn't accept same name we need to append timestamp
      //   to formname.
      String newFormName=createForm(formName);
  
      // In below method we pass above newFormName and verify whether form is created or not by searching form name.
      asserTrue(searchCreatedForm(newFormName));
  
  }
  </code></pre>
  
  <p>Now we are moving to cucumber and we need to accomplish above example in cucumber.</p>
  
  <p>Feature: Forms. </p>
  
  <p><br>Scenario: Login to application
  <br>Given Create form with name “formname”
  <br>Then Search “formname”</p>
  
  <p>Issue that we are facing ->
  The formname that is getting returned in step1, we don’t know how to pass it to step2 .
  Within scenario, We need to pass this form name to different step definition which is implemented in various classes.</p>
  
  <p>I tried to search over the net however didn’t  find anything specific to our need.</p>
  
  <p>It will be great help if anyone could give us some pointers/suggestion.</p>