Search code examples
rubyselenium-webdrivercucumbercapybarasite-prism

undefined method `steps' for #<Cucumber::Ast::OutlineTable::ExampleRow:xxx> (NoMethodError)


My cucumber feature file is using scenario outline like below:

Scenario Outline: 
  And user searches for item "<item>"
  Then homepage is active
  And user selects "<type>" Type(s)

Examples:
  | item | type |
  | car | bmw   |
  | car | honda  |

Throws this below error message on :

undefined method `steps' for #<Cucumber::Ast::OutlineTable::ExampleRow:0x007f83buyg71120> 
(NoMethodError)

I am using cucumber 1.3.19 and in my env.rb file before hook, i am using below where the error is thrown from:

scenario.steps.map(&:name)

Solution

  • I have fixed this issue by upgrading my cucumber version to 2.0.2