Persisting variable values between scenarios in capybara -
i have code below
if "#{w}" != emailofuser globalvariableforsecemail("#{w}") end def globalvariableforsecemail(useremail) $secuseremail = useremail + "rms.com" end
the problem have first time scenario run , succeeds, second time run scenario $secuseremail value not input onto text box. want use variable across scenarios in feature file , run feature multiple times, how can achieve this?
it's best avoid global variables across scenarios.
if want it, put global variable in background/before block in feature spec
Comments
Post a Comment