This is as much a cucumber question as it is a Frank question. Sounds like you're asking about hw
First you'll want to save your generated username somewhere it can be used in other steps. You can do that by assigning it to a member variable.
Given /^I generate a username$/ do
@username = Rand.rand(10) + "@test.email.com"
end
Now you can reference that variable in another step. Here's a step which will find the text field in the UI with the placeholder you want, tap it, and then type the previously assigned username into that field.
When /^I enter my username into the username field$/ do
text_field_selector = "view:'UITextField' placeholder:'username'"
touch( text_field_selector )
type_into_keyboard( @username )
end
Obviously you might want to change that selector depending on what the best way is to specify the field you want to type into.
Note that I'm using the type_into_keyboard
helper method which is only available in recent version of Frank. Upgrade if you need to.
Hope that helps. The frank mailing list is a great place to get support too - https://groups.google.com/group/frank-discuss