title: Optimize complex scenario in Cucumber
body: <p>I have been working on an automation project where I have to write cucumber test for search filter. Search filter works dynamically where parameters are nested - next parameter are populated based on previous parameter e.g. On selecting "Subscribers" next parameters in dropdown are "Name", "City", "Network". Likewise, on selecting "Service Desk", parameters in subsequent dropdown are "Status", "Ticket no.", "Assignee". I am using <code>Scenario Outline</code> as below:</p>
  
  <pre><code>Scenario Outline: As a user, I can search records
     Given I am on search page
     When I search on "&lt;category&gt;" and "&lt;nestedfilter&gt;"
     Then I see records having "&lt;category&gt;" category
  
  Examples:
  |category    |nestedfilter|
  |Subscribers |Name        |
  |Subscribers |City        |
  |Subscribers |Network     |
  |Service Desk|Status      |
  |Service Desk|Ticket no.  | 
  |Service Desk|Assignee    |
  </code></pre>
  
  <p>The filter could be more complex as there could be more nested filters based on previous nested filters.</p>
  
  <p>All I need to know if there could be a more efficient way to handle this problem? For example passing data table to step_definition for which I am not too sure.</p>
  
  <p>Thanks</p>