Java-Client::scrollTo does NOT work on named element

Hardware: Simulator
Appium: 1.4.8
Java-client: 3.2.0
Language: Java

Can be found/located but FAILED to scroll to a text element of xpath=.//UIATableView/UIATableCell/UIAStaticText, which has been named via accessibilityIdentifier.

Preliminary analysis,
The name attribute of the element is no longer filled by it’s value, can be inspected via Appium Inspector; hence the implementation of may be wrong.

public MobileElement scrollTo(String text) {
    return (IOSElement) findElementByIosUIAutomation(".scrollToElementWithPredicate(\"name CONTAINS '" + text + "'\")"); 

shouldn’t it be:

return (IOSElement) findElementByIosUIAutomation(".scrollToElementWithPredicate(\"value CONTAINS '" + text + "'\")");

Once an element has been set with accessibilityIdentifier=some-value, this some-value will be displayed at its “name” attribute, hence withPredicate("name… with not be the same as withPredicate("value…

Originally posted at