-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is no support in the selector engine for UICollectionView #178
Comments
This is a pretty hard one to fix I'm afraid. The ordering is based on the order of the subviews in the live view hierarchy, and that ordering appears to be quite arbitrary (presumably there are performance reasons for this). It's conceivable that we could re-arrange the reported order based on the view's location in the UI, but I don't see one general heuristic that could be used to decide that ordering. |
The same thing can happen with UITableView when cells are dynamically added/removed. It can also happen with plain UIScrollView - I saw it changing the order of its subviews in some cases (optimization?). The best solution would be to add "sort" predicates to the query language. Sorting by position seems to be the best sorting option here (UIAutomation does it too). Actually I am doing it in my frank tests - get all the cells (using "index"), sort them by accessibilityRect and then return the cell at the given position. A much bigger problem is to get the text in table section headers. It requires some magic to check if the returned labels are not inside a cell. |
I am having the same problem too. such as I write a function - (void) clickTableViews thanks a lot. chao xu On 2013年4月9日Tuesday at 下午11:03, ondrejhanslik wrote:
|
You can use |
I'm going to close this issue out. I don't see a way to order the views that will always yield the 'correct' order. |
Selectors such as "view:'UICollectionViewCell' first" don't work as expected - It selects an arbitrary cell rather than the first one.
The text was updated successfully, but these errors were encountered: