Hy! I am trying to write predefined steps in calabash ios for finding a button with a certain title. My question is how do I find a certain UIButton using its title label in calabash? I've tried the following:
Then (/^I see button with title "([^\"]*)" disabled$/) do |buttonTitle|
buttons = query("UIButton").compact
buttons.each do |button|
if query(button, :titleLabel, :text) == buttonTitle
fail(msg="Button found")
return
end
end
end