Re: Do I need multiple scenarios to manage radio buttons?

69 views
Skip to first unread message

Marisa Roman

unread,
Jun 22, 2012, 11:01:49 AM6/22/12
to selenes...@googlegroups.com
You can pass parameters to scenario tables - see http://fitnesse.org/FitNesse.UserGuide.SliM.ScenarioTable

e.g.

!| scenario |choose the ip version | versionRadiobutton|
| click | @versionRadiobutton |

Then you would invoke it as follows

!|choose the ip version |
| version radiobutton|
| id=foo |

What I'd also suggest is to define variables (if you haven't already) for your control locators. If you define variables, you only have to update their values in one place (on one fitnesse page) if the locators happen to change.

e.g.

!define ipVersion4Radiobutton (id=form1:selectOneRadio2:_1)
!define ipVersion6Radiobutton (
id=form1:selectOneRadio2:_2)

^^ Those would live on a top-level page or on a page you can include in your tests.

!|choose the ip version |
| version radiobutton|
| ${ipVersion4Radiobutton} |


On Thu, Jun 21, 2012 at 4:21 PM, Karen Tobo <kjt...@gmail.com> wrote:
My app has multiple radio button selections - one example is setting IP version to IPv4 or IPv6. 

Do I need a scenario for each radio button selection? Or is there a nifty way to pass the selection to the scenario and select the appropriate button?

!|scenario|Choose the IP Version IPv4|
|click|id=form1:selectOneRadio2:_1|

!|scenario|Choose the IP Version IPv6|
|click|id=form1:selectOneRadio2:_2|

Thanks,

 - Karen



--
Marisa
Reply all
Reply to author
Forward
0 new messages