I am trying to scroll an element to left
the element is scrollable it has five filter m 4 are visible and the fifth one is hidden until i scroll to it I have attached a photo
I have tried this ways but none worked:
way 1:
String scrollElement = “new UiSelector().resourceIdMatches(“id”)”;
String elementHidden = “new UiSelector().descriptionContains(“contentDes”)”;
MobileElement filter = driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(" + scrollElement + ")" +
".scrollIntoView(" + elementHidden + ")"));
filter.click();
way 2:
driver.findElement(MobileBy. AndroidUIAutomator (“new UiScrollable(new UiSelector().”
- “resourceId(‘id’)).setAsHorizontalList().scrollIntoView(new UiSelector().text(‘text’))”)).click();
thanks