Calabash android, as clicking a ListView?


I've been looking for the answer on the Internet, but could not find it. help me please. How to make pressing the list item in Calabash-Android?


Try this out

Add a definition to ruby step file.

Then /^I scroll to cell with "([^\"]*)" label and touch it$/ do |name| element="TextView text:'#{name}'" if !element_exists(element) wait_poll(:until_exists => "TextView text:'#{name}'", :timeout => WAIT_TIMEOUT) do performAction('scroll_down') end if element_exists(element) touch(element) sleep(STEP_PAUSE) else screenshot_and_raise "could not find the cell" end else touch(element) sleep(STEP_PAUSE) end end

and call it from feature file Then I scroll to cell with "cellMainLabel" label and touch it


The answer above looks a bit more fool proof than mine but I have been using the following quite happily:

spinner selection Then (/^I select spinner by id "(.*?)"$/) do |spinnerid| touch("spinner id:'#{spinnerid}'") end select an item in the damn spinner Then (/^I touch "(.*?)"$/) do |text| touch("TextView text:'#{text}'") end

it's two steps, first part will select the spinner via its id and then the second part selects the item in the spinner via the text you quoted.


  • wrong item changes in recyclerview
  • How to expand parent div to account for child's overflow?
  • Why does .addView throw this parent/child exception?
  • How to Handle Click on Imageview in Custom Listview with image and Textview?
  • Null ImageView Reference
  • How to add the custom button on google's(device) native application in android?
  • change search magnifying glass to UIActivityIndicatorView
  • C# List of Panels
  • Blackberry 6: how to detect a long click on track pad?
  • Center align outputs in ipython notebook
  • xcode don't localize specific strings
  • C: Incompatible pointer type initializing
  • why xml file does not aligned properly after append the string in beginning and end of the file usin
  • custom UITableViewCell with image for highlighting
  • Swift: Switch statement fallthrough behavior
  • Play WS (2.2.1): post/put large request
  • Set the selected item in dropdownlist in MVC3
  • Python CGI os.system causing malformed header
  • DomPDF {PAGE_NUM} not on first page
  • Exchange data b/w iOS devices using Bluetooth 4.0
  • java.lang.NoClassDefFoundError: com.parse.Parse$Configuration$Builder on below Lollipop versions
  • Align navbar back button on right side
  • AES padding and writing the ciphertext to a disk file
  • How to convert from System.Drawing.Color to Excel.ColorFormat in C#? Change comment color
  • Why doesn't :active or :focus work on text links in webkit? (safari & chrome)
  • Sending data from AppleScript to FileMaker records
  • Validaiting emails with Net.Mail MailAddress
  • MySQL WHERE-condition in procedure ignored
  • vba code to select only visible cells in specific column except heading
  • Which linear programming package should I use for high numbers of constraints and “warm starts” [clo
  • Hazelcast - OperationTimeoutException
  • Weird JavaScript statement, what does it mean?
  • Web-crawler for facebook in python
  • Cannot Parse HTML Data Using Android / JSOUP
  • File upload with ng-file-upload throwing error
  • trying to dynamically update Highchart column chart but series undefined
  • Django query for large number of relationships
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?
  • java string with new operator and a literal