Google+ Followers

Friday, 23 January 2015

Useful calabash queries : methods to count elements / read elements and find text present


















These are queries used with UI picker view - https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPickerView_Class/index.html

Scrolling to particular row: 
query("pickerView",[{selectRow:3},{inComponent:0},{animated:1}])



Read elements from picker view
query("pickerView",:delegate, [{pickerView:nil},{titleForRow:3},{forComponent:0}])
Count Number of items in picker view

 query("pickerView",[{selectedRowInComponent:0}])



1 comment:

  1. Does query("pickerView",[{selectedRowInComponent:0}]) return an integer?

    ReplyDelete