How to use the same value between two steps?

67 views
Skip to first unread message

X

unread,
Jul 12, 2012, 10:26:15 AM7/12/12
to Behat
For example, sometimes I need to register on the site with random e-
mail, and then in the end of scenario - delete this user.
Step:
And I fill in "user_email" with "1...@yandex.ru"
can I fill this field not with a string value, but with the generated
value? And then remember the same value to find this email in
administration interface of the site to delete this user in the end of
scenario?

Kenneth Skertchly

unread,
Nov 28, 2012, 2:06:59 PM11/28/12
to be...@googlegroups.com
Did you find a way to do this? I'm in a similar situation where I need to get the current value of a field in a form, change it, and then restore the original value.

Baptiste Clavié

unread,
Nov 28, 2012, 2:09:57 PM11/28/12
to be...@googlegroups.com
Hi, 

You'll need to create new steps (I store this value, I fill this (element) with the last value...), and use static properties to effectively store the element. That's how i do it. :)

---
Baptiste Clavié - 06.88.68.10.16
http://baptiste.clavié.net
Reply all
Reply to author
Forward
0 new messages