0

Prior to calabash-ios v0.9.169 I used to be able to obtain certain navigation button controls using the following query:

query("view:'_UIToolbarUINavigationButton'")

Since v0.9.169 I can no longer obtain this control- the query returns an empty array. I can do a more general query for UIButton and it is returned in the result:

[2] "<_UIToolbarNavigationButton: 0xd9ab880; frame = (-11 7; 41 30); opaque = NO; layer = <CALayer: 0xd9aba50>>",

What is the recommended way to obtain this button?


System info:

  • xcode-select --print-path -> /Applications/Xcode.app/Contents/Developer

  • xcodebuild -version -> Xcode 5.1.1 Build version 5B1008

  • calabash-ios version -> 0.9.169

  • calabash.framework version -> 0.9.169

  • server_version['version'] -> "0.9.169"

jmoody
  • 2,480
  • 1
  • 16
  • 22
  • Yep- my bad- this was a typo as a result of find & replace rename of all the queries to prefix controls with UI (something that changed @v0.9.169). Thanks Joshua! – user1153696 Jun 09 '14 at 13:11

1 Answers1

0

query("view:'_UIToolbarUINavigationButton'")

There is a typo in your query.

_UIToolbarNavigationButton'

not

_UIToolbarUINavigationButton

I will take this opportunity to point you to some alternative and more stable ways of interacting with Toolbar Buttons:

jmoody
  • 2,480
  • 1
  • 16
  • 22
  • Thanks for the info Joshua- and for spotting my typo! I've reviewed wait_tap and not sure how that helps me in this scenario? Will briar ever be merged into calabash- I'd prefer less moving parts in my environment setup. – user1153696 Jun 09 '14 at 13:12
  • Briar is the proving ground for calabash features. It will probably never be fully merged. wait_tap is wait + tap rolled into one function. Navigation buttons are often visible to `query` before they can actually be touched because of animations. – jmoody Jun 10 '14 at 16:08