Obtaining navigation button controls in calabash-ios v0.9.169

252 Views Asked by At

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"

1

There are 1 best solutions below

2
On BEST ANSWER

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: