Skip to content
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

element not found after scroll down #804

Open
GavinCando opened this issue Mar 18, 2019 · 5 comments
Open

element not found after scroll down #804

GavinCando opened this issue Mar 18, 2019 · 5 comments

Comments

@GavinCando
Copy link

GavinCando commented Mar 18, 2019

After calling this code, I can see the element on the screen of my mobile phone. but earlgrey can not found the element.

[[EarlGrey selectElementWithMatcher:grey_allOf(grey_accessibilityID(@"tableView"), grey_kindOfClass([NSClassFromString(@"xxxx") class]), nil)] performAction:grey_scrollInDirection(kGREYDirectionDown, 1000)];
[[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"xyz")] assertWithMatcher:grey_sufficientlyVisible()];

I can see from the log that element does not appear in UI hierarchy.

Please make your suggestions.

@tirodkar
Copy link
Collaborator

Please use the usingSearchAction:onElementWithMatcher: method for finding the element.

@GavinCando
Copy link
Author

Please use the usingSearchAction:onElementWithMatcher: method for finding the element.

I tried what you said, but it's a tableview. In the process of sliding online, the log shows that my target element is not in it UI hierarchy.

@GavinCando
Copy link
Author

What is the way to refresh UI hierarchy manually?

@GavinCando
Copy link
Author

GavinCando commented Mar 19, 2019

When I used SearchAction: onElementWithMatcher: method, I observed through accessibility inspector that UI hierarchy was not updated

@tirodkar
Copy link
Collaborator

Got an error log? Would be easier to help you with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants