For the life of me, I can't figure out how to select a button containing a string. I have a button that says, "Notes (83)" and 83 is the # of new notes. This will change frequently so I want to be able to tap/click on the button when it finds the text "Notes."
I'm sure I'm just not getting the syntax quite right. Does someone have an example of some Ruby code you use to select by ios predicate string?
I'm using Appium 1.6.3, Xcode 8, XCUITest, and Ruby. This is what I think has me the closest:
wait { find_element(:name => /Notes/).displayed? }
And here's what I'm seeing in the logs:
Got response with status 200: {"value":{"using":"name","value":"(?-mix:Notes)","description":"unable to find an element"},"sessionId":"5ADFEB84-F8E0-4975-BC67-818A5DD0F1B9","status":7}
Am I not escaping "Notes" correctly? Should I not be using :name? Help? The docs aren't quite getting me there.