TestingWithFrank / Frank

Automated acceptance tests for native iOS apps
http://testingwithfrank.github.io/
Apache License 2.0
215 stars 57 forks source link

Feature Request: Longpress / Press And Hold #20

Closed jfahrenkrug closed 10 years ago

jfahrenkrug commented 10 years ago

Hi!

Would it be possible to expose a "longpress" gesture? It seems as if PublicAutomation already offers this: https://github.com/TestingWithFrank/PublicAutomation/blob/master/PublicAutomation/UIAutomationBridge.h#L41

Thanks for the great work!

jfahrenkrug commented 10 years ago

After some research I've found the "tap_and_hold" ruby method. So I can do this:

Then /^I longpress the "([^"]*)" tab$/ do |tab_name|
  tap_and_hold("view:'UITabBarButton' marked:'#{tab_name}'", 2)
  wait_for_nothing_to_be_animating 
end

It would be great to have steps pre-defined for all supported gestures! :)