How to add Date as a variable field in my code to print in a text field (Ruby)
<p>I am writing a quick automation script using Ruby, Cucumber, Watir-webdriver etc. I am creating an ad campaign and want the title of the campaign (a text field I can enter anything into) to contain whatever today's datetime is. Currently my code looks like:</p>

<pre>
When(/^I enter "([^"]*)" into the campaign name field$/) do |arg1|
  @browser.textarea(:id => 'campaign_name').set('SBTC - Regression - Campaign Create-' Time.now.strftime("%d/%m/%Y %H:%M")) 
end
</pre>

<p>Obviously that's not correct and I haven't seen anything on the forum on how to do it. End result is that when the automation finishes I have a new ad campaign title "SBTC - Regression - Campaign Create - [TodayDateTime]"</p>