Question

I'm just getting started with calabash, working with Capybara the last couple of months.

I can't seem to get a solid lock on touching a button when it is in a popup or when it opens a tab.

Sometimes a single touch works fine, sometimes 2 touches are necessary, sometimes x,y coordinates rather than name, sometimes none of the above.

With capybara, wait for and delay has great success in mitigating this. No such luck with calabash.

Does anyone have ideas on how to increase success on getting a button to press?

Was it helpful?

Solution

The problem is probably that the button is not on the screen yet when you try to press it.

The safest thing is to figure out the id of the button and then do:

performAction('wait_for_view_by_id', button_id)
performAction('press', 'button_id')

or on a higher level:

I wait for the view with id "button_id" to appear
I press "button_id"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top