Advertisement
gust94

original steps calabash

Apr 5th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. # original steps calabash
  2.  
  3. Given(/^the app has launched$/) do
  4. wait_for do
  5. !query("*").empty?
  6. # touch("label marked:'TARIK SALDO'")
  7. sleep(10)
  8. touch("* marked:'btnRecord'")
  9. sleep(10)
  10. touch("label marked:'TANYA'")
  11. sleep(5)
  12. touch("label marked:'X'")
  13. sleep(5)
  14. touch("* marked:'btnRecord'")
  15. sleep(5)
  16. end
  17. end
  18.  
  19. And(/^I have done a specific thing$/) do
  20. # Example: Given I am logged in
  21. # wait_for do
  22. # !query("* marked:'username'").empty?
  23. # end
  24. #
  25. # touch("* marked:'username'")
  26. # wait_for_keyboard
  27. # keyboard_enter_text("cleveruser27")
  28. #
  29. # touch("* marked:'password'")
  30. # wait_for_keyboard
  31. # keyboard_enter_text("pa$$w0rd")
  32. #
  33. # wait_for_element_exists("* marked:'Login'")
  34. # touch("* marked:'Login'")
  35.  
  36. # Remember: any Ruby is allowed in your step definitions
  37. did_something = true
  38. unless did_something
  39. fail 'Expected to have done something'
  40. end
  41. end
  42.  
  43. When(/^I do something$/) do
  44. # Example: When I create a new entry
  45. # tap("* marked:'new_entry'")
  46. # wait_for_keyboard
  47. # keyboard_enter_text("* marked:'entry_title'", 'My Entry')
  48. #
  49. # tap("* marked:'submit'")
  50. end
  51.  
  52. Then(/^something should happen$/) do
  53. # Example: Then I should see the entry on my home page
  54. # wait_for_element_exists("* text:'My Entry'")
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement