{"action":"created","issue":{"url":"https://api.github.com/repos/xebia/Xebium/issues/160","repository_url":"https://api.github.com/repos/xebia/Xebium","labels_url":"https://api.github.com/repos/xebia/Xebium/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/xebia/Xebium/issues/160/comments","events_url":"https://api.github.com/repos/xebia/Xebium/issues/160/events","html_url":"https://github.com/xebia/Xebium/issues/160","id":138981797,"number":160,"title":"How to define variables for scenarios on a test page?","user":{"login":"pmmvr","id":17574355,"avatar_url":"https://avatars.githubusercontent.com/u/17574355?v=3","gravatar_id":"","url":"https://api.github.com/users/pmmvr","html_url":"https://github.com/pmmvr","followers_url":"https://api.github.com/users/pmmvr/followers","following_url":"https://api.github.com/users/pmmvr/following{/other_user}","gists_url":"https://api.github.com/users/pmmvr/gists{/gist_id}","starred_url":"https://api.github.com/users/pmmvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmmvr/subscriptions","organizations_url":"https://api.github.com/users/pmmvr/orgs","repos_url":"https://api.github.com/users/pmmvr/repos","events_url":"https://api.github.com/users/pmmvr/events{/privacy}","received_events_url":"https://api.github.com/users/pmmvr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-07T13:47:18Z","updated_at":"2016-03-09T09:33:19Z","closed_at":null,"body":"Hi,\r\n\r\nI 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. \r\n\r\nWhen 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...\r\n\r\nI 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\r\n```\r\n| scenario | add product | productname |\r\n| ensure | do | sendKeys | on | id=product_name | @productname|\r\n```\r\n\r\nand this in the test page\r\n```\r\n!define productname {iPad}\r\n\r\n|script|\r\n|add product | $productname|\r\n```\r\nbut this seems to work only for 1 variable ...\r\n\r\nDoes anyone have a tip or a work-around to get this working?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/xebia/Xebium/issues/comments/194207024","html_url":"https://github.com/xebia/Xebium/issues/160#issuecomment-194207024","issue_url":"https://api.github.com/repos/xebia/Xebium/issues/160","id":194207024,"user":{"login":"pmmvr","id":17574355,"avatar_url":"https://avatars.githubusercontent.com/u/17574355?v=3","gravatar_id":"","url":"https://api.github.com/users/pmmvr","html_url":"https://github.com/pmmvr","followers_url":"https://api.github.com/users/pmmvr/followers","following_url":"https://api.github.com/users/pmmvr/following{/other_user}","gists_url":"https://api.github.com/users/pmmvr/gists{/gist_id}","starred_url":"https://api.github.com/users/pmmvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmmvr/subscriptions","organizations_url":"https://api.github.com/users/pmmvr/orgs","repos_url":"https://api.github.com/users/pmmvr/repos","events_url":"https://api.github.com/users/pmmvr/events{/privacy}","received_events_url":"https://api.github.com/users/pmmvr/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T09:33:19Z","updated_at":"2016-03-09T09:33:19Z","body":"Hi,\r\n\r\nThanks for your answer. I found a workaround.\r\n\r\nIn my OP i wrote:\r\n> but this seems to work only for 1 variable ...\r\nWhich was a wrong and premature assumption on my side.\r\nI found out that each variable in the scenario title needs a preceding descriptor in order to work. So my current workaround is to add all variables in the relevant scenario in the Scenario Library, so you get this:\r\n```\r\n|Scenario| Add new product | PRODUCT| with color | COLOR | and memory| MEMORY |\r\n| ensure | do | type | on | id=name| with | @PRODUCT |\r\n| ensure | do | select| on | id=colortype | with | lablel=@COLOR |\r\n| ensure | do | select | on | id=gb-memory| with | label=@MEMORY |\r\n```\r\n\r\nIn the test page I add the following variables:\r\n```\r\n!define PRODUCT {iPAD}\r\n!define COLOR  {Space Grey}\r\n!define MEMORY {16gb}\r\n```\r\n\r\nAnd the sript as:\r\n|script|\r\n| Add new product | ${PRODUCT}| with color | ${COLOR} | and memory| ${MEMORY} |\r\n\r\nWhich is working for now. "}}