0

On iOS 7, I have a test like this for calabash:

And I fill in text fields as follows:

  | field                     | text              |
  | Name                      | Batking           |
  | Apt/Suite #               | 87                |
  | ZIP Code                  | 68067             |
  | Location Name (e.g. Home) | Cave              |

The textfields are on that view but somehow touch doesn't find them. The test fails and gives an error:

touch could not find view: 'textField marked:'Street Address'', args: {:query=>"textField marked:'Street Address'"} (RuntimeError)

Does anyone has a solution for this? Your help will be much appreciated

orde
  • 5,233
  • 6
  • 31
  • 33

1 Answers1

0

Try using 'tap' and tap the field by the name of the label. Example: tap 'Street Address'. If you need help finding the label name then query it. Example: change directory into your project location. Then run calabash-ios console to run the irb for your project. Then run start_test_server_in_background to start the calabash simulator. Navigate to the view that has the textField you need. Then run query("label"). Find the name of the label then run the tap command from above. Hope this helps

king_wayne
  • 222
  • 1
  • 9