Reputation: 109
Does anyone know if there is a way to uses variables in a calabash touch/query/etc function?
For example, say I have a variable called hotel_name and I wanted to touch("* marked:#{hotel_name}") and use that in a test step like:
Given(/I select "(.*?)"$/) |hotel_name|
touch("* marked:#{hotel_name}") end
it is not working for me. So can someone tell me if this can be done and how?
Thanks
Upvotes: 0
Views: 327
Reputation: 158
There are missing apostrophes in your query and do
in your block :) Proper code should look like that:
Given(/^I select "(.*?)"$/) do |hotel_name|
touch("* marked:'#{hotel_name}'")
end
I think it should help :)
Upvotes: 1