0

In my cucumber feature file, Ihave some thing like this:

Scenario Outline: Hi Hello
Given I open
When I fill details <name> <Age> <DON> <Place> 
Then Click enter
Then I verify
Examples: 
|Name|Age|BOB |Place|

|JOHN|20 |2000| OH  |

Above Examples values are used in When step , I'm trying to verify all details in Last step "Then I verify" , where actually i'm not passing any value to that step .

Question : Do we have any way to read Examples details from Last Then method(Step)

Is there a way to read Examples Key value from Step "Then I verify"

orde
  • 5,233
  • 6
  • 31
  • 33
Jagadeesh
  • 71
  • 1
  • 2
  • 6

1 Answers1

2

Can't you do this:

Scenario Outline: Hi Hello
Given I open
When I fill details <name> <Age> <DON> <Place> 
Then Click enter
Then I verify <name> <Age> <DON> <Place> 
Examples: 
|Name|Age|BOB |Place|

|JOHN|20 |2000| OH  |

The whole point of using variables in angular brackets is that we can use the same value of the variable at multiple places.

Neha
  • 316
  • 1
  • 4
  • 16
  • I already know what you mentioned , Currently that's how oi implemented . But I want to know any other way where we can fetch input data from any step – Jagadeesh Jan 04 '19 at 15:28