문제

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?

도움이 되었습니까?

해결책

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"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top