1

I'm new to Calabash-iOS automated testing, but need to get automation in place quickly. The app I'm working on has a pop-up cancel/confirm message when logging out. I've tried every way I can find to click the confirm button in the pop-up but I can't seem to get it to work.

If at all possible, try to give me an answer using the Calabash pre-defined steps as I'm not at the point of creating custom steps yet.

enter image description here

Chris Traynor
  • 460
  • 1
  • 5
  • 14

3 Answers3

2

The Calabash iOS Smoke Test app has examples of touching alerts: alerts.feature.

Then I touch the "Confirm" button

This is a predefined step that is trying to touch a button. Starting in iOS 7(?), the "Confirm" view in the alert is not a button, but a UITableViewCell.

Then I touch "Confirm"

This tries to touch the first view marked "Confirm".

jmoody
  • 2,480
  • 1
  • 16
  • 22
0

Since I do not know what you have tried before, and also because you don't want to know how to define your own methods/steps, Calabash for iOS does have a pre-defined step to do this. Try this Then I touch the "Confirm" button.

king_wayne
  • 222
  • 1
  • 9
0

Apparently, Then I touch "Confirm" was all that was needed. Which is weird cause I could have sworn I tried that. For some reason it was not being interpreted as a button.

Chris Traynor
  • 460
  • 1
  • 5
  • 14
  • It might have been a timing issue, if you try to click it before it is rendered. Often you need to add some delays in when UI is being updated and you can also add wait for checks allowing the test to wait for x seconds before throwing an error for element not found. – Lasse Oct 12 '15 at 04:23