I have a method which works perfectly locally, but when I launch it on server I’ve got an error:

org.openqa.selenium.InvalidArgumentException: Unable to determine element locating strategy for -android uiautomator

Method is scrolling view till element with text I need:

public void tapOnElementByIdAndText(String resourceId, String visibleText) {
                "new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().resourceId(\"" + resourceId + "\").text(\"" + visibleText + "\").instance(0))").click();

How can I make it work or any other smooth solution for scrolling screen?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.