Coachmark not dismissed in Android App in Apium

When I run my app in Apium, I am able to login successfully. After login there is a coachmark to help first time users. I am not able to dismiss this coachmak using Apium methods. I have tried multiple methods as follows -

(1) Thread.sleep(5000);

(2) WebDriverWait wait = new WebDriverWait(driver, 15, 3000);

(3) findElementByXPath and findElementById both

The error I am getting is this:
org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters.
For documentation on this error, please visit:

This is what my method looks like:

void logInBeforeOtherTestcases() throws Exception {
// LogIn login = new LogIn();
if (readFile(ExcelFilePath, ExcelTestSuite, ExcelTestSuiteSheetName, “GenerateSmartPractice”) &&
readFile(ExcelFilePath, ExcelTestCase, ExcelTestCaseSheetName, “smartPractice”)) {
if (readFile(ExcelFilePath, ExcelTestCase, ExcelTestCaseSheetName, “smartPracticeReportedQuestion”)) {
} else {“Login not excecuted check excel file configuration”);

void smartPractice() throws Exception {"Smart Practice Start");

    String name = findByXpath("/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.view.ViewGroup/androidx.viewpager.widget.ViewPager/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout[1]/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout/android.widget.LinearLayout[1]/android.widget.TextView[1]").getText();"name is :- "+name);

  1. Share DOM tree screenshot with inspector.
  2. Use touch action methods and give a try.

this is dom tree.

I try with touch action and it will work fine.
Example :-

  1. touchAction(913, 485);
  2. new TouchAction<>(driver).tap(PointOption.point(xOffset, yOffset))

Problem :- In App

  1. without login work fine.(step 1. goto home page -> find course and so on.)
  2. with login not working (step 1. login popup open -> after successfully login -> element not found in home page ).