How to define variables for scenarios on a test page? #160
Description
openedon Mar 7, 2016
Hi,
I have a number of generic test scenarios that contain variables. I now want to combine these scenarios in test pages to create user stories. The definition of the variables will be different in each test page.
When I define the variables in the ScenarioLibrary page it works flawless. However, when I define the variables in a test page and create a script combining a number of scenarios, Fitnesse is unable to grab the definition of the variables...
I am aware it's possible to use variables by placing a variable name after the scenario logical name, calling the variable in the scenario and then defining this variable again in the test page. Like this in ScenarioLibrary
| scenario | add product | productname |
| ensure | do | sendKeys | on | id=product_name | @productname|
and this in the test page
!define productname {iPad}
|script|
|add product | $productname|
but this seems to work only for 1 variable ...
Does anyone have a tip or a work-around to get this working?
Thanks.