Closed patrick-silvera closed 7 years ago
Can you show a picture?
Have you tried:
query("all * marked:'your mark'")
Thanks it works with this query, I did not know about the "all" keyword. Is this the expected behavior? Here is a screenshot of the storyboard:
Is this the expected behavior?
Maybe. Calabash use a heuristic to determine what is "visible". In general, the rule is that the middle of the view must be visible. The middle of the view might not be visible for several reasons:
We added the "all" keyword to handle cases like yours: view is visible to a human, but the heuristic is failing.
UIScrollView and its subclasses are special cases in the LPServer - you might have bumped into on of these special cases. I would have to investigate to tell you exactly what is happening.
You're right, the middle point of the UILabel is not visible because in my case the text is very long (term of use) and there's a lot of scroll. When I reduce the text size, so there's still some scroll but the middle point is visible without scrolling, query without "all" keyword works.
I'm OK with your workaround, I let you close this issue or leave it open if you want to investigate.
Hello, I'm trying to search for text inside an UIScrollView. Storyboard hierarchy is:
Calabash
tree
command returns thisQueries for id/text/mark of the UILabel returns an empty array. On the other hand, other interaction like scrolling does work.
Environment: calabash-ios 0.20.5 ruby 2.3.0 iOS 10.2.1