This might not work as the pattern is the same. <field2> and <value2> will override <field> and <value>
I would rather write it like this: Scenario: xxx should enable save button Given save button is disabled And I my context is <context> Then the save button should be enabled Example: | context | | q1=yes,q2=no | | q1=no,q2=yes | You might use any form you like to describe your context 2012/12/19 Foley, Brooks (GE Healthcare) <[email protected]> > ** ** > > I am looking to use the same method for a scenario but need to use > different inputs**** > > ** ** > > Given I set <field> to <value>**** > > And I set <field2> to <value2>**** > > Then I expect save button enabled**** > > ** ** > > |field|value|field2|value2|**** > > |Q1 |Yes |Q2 |No |**** > > |Q1 |No |Q2 |Yes |**** > > ** ** > > @Given(“I set <field > to <value >”)**** > > public void iSetValue (Sting field,String value) {**** > > …..**** > > }**** > > ** ** > > Do I need to create an entry in the steps file for each “I set…” or is > there a way to make it so that I can use my own values for the fields and > values?**** > > ** ** > > Brooks**** > -- Cordialement/Regards, Louis GUEYE linkedin <http://fr.linkedin.com/in/louisgueye> | blog<http://deepintojee.wordpress.com/>| twitter <http://twitter.com/#%21/lgueye>
