Thanks again Aleksei !! Now further to finding the parent, I did try to perform the following "swipe : left" option as follows :
// This swipe left does enable "rename / delete - buttons
WebElement sampleTextListElement = DriverUtils.getLocalAndroidDriver().findElement(MobileBy.AndroidUIAutomator(
"new UiScrollable(new UiSelector().className(\"android.support.v7.widget.RecyclerView\").scrollable(true)).scrollIntoView("
+ "new UiSelector().textContains(\"Aaaaa\"));"));
WebElement parent = DriverUtils.getLocalAndroidDriver().findElement(MobileBy.xpath(""
+ "//*[@resource-id ='tv_shopping_list_item_line1' and contains(@text,'Aaaaa')]/.."));
HashMap<String,String> scrollObj = new HashMap<String,String>();
scrollObj.put("direction", "left");
scrollObj.put("element", ((RemoteWebElement) parent).getId());
((JavascriptExecutor) DriverUtils.getLocalAndroidDriver()).executeScript("mobile: swipe", scrollObj);
I see the following error ::
org.openqa.selenium.WebDriverException: Method has not yet been implemented (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 10 milliseconds
Additionally I tried the following way using TouchAction :
int startx = (int) (parent.getSize().getWidth()*0.85);
int floaty = (int) (parent.getSize().getHeight()*0.5);
int endx = (int) (parent.getSize().getWidth()*0.15);
new TouchAction(DriverUtils.getLocalAndroidDriver()).press(parent,startx,floaty).waitAction(Duration.ofMillis(3000)).moveTo(parent,endx, floaty).release().perform();
But using TouchAction, it does a longPress and opens relevant set of action.
What would be ideal way to do a leftSwipe on parent element ?