Forum Discussion

sgoulet's avatar
sgoulet
Contributor
2 years ago

BDD before scenario hook - get the data in the datatable

So I have some BDD tests which are connected to Cucumber Studio. I have a before scenario hook

 

BeforeScenario(function (scenario){

  // so it looks like this fires before each row in the datatable.
  var resources = require("Resources");
  resources.CloseAllWindows();
  
  
})

 

I see data I can get to in scenario  object param

 

 

 

This hook fires before each row in the data table. In this scenario example, I have one row in the datatable. Another scenario with several examples shows count = 1. From playing games with breakpoints, I am inferring that this hook executes before each row in its datatable. I would like to get information about the row in the datatable from scenario.Example or ... something.

 

Is there any way to get data from the datatable row in this hook?

 

Thanks

 

 

No RepliesBe the first to reply