Using one object of TouchAction class can I perform two tap actions sequentially on two different elements present in two different pages?
for instance:
AndroidDriver driver= capabilities();
TouchAction ta= new TouchAction(driver);
//AndroidElement optViews = driver.findElementByAndroidUIAutomator(“text(“Views”)”);
//touch views option in the home screen
ta.tap(driver.findElementByAndroidUIAutomator(“text(“Views”)”)).perform();
AndroidElement subOptExpandableList = driver.findElementByXPath("//android.widget.TextView[@text=\"Expandable Lists\"]");
//touch the option expandable lists in sub screen
ta.tap(subOptExpandableList).perform();