Clicking on Element not works in one case and shows error message nosuchelement found

Clicking on Element not works and shows error message nosuchelement found.

I tried with xpath and touch action, this element place in the framelayout will come over existing page/screen when click on element in the app.

code i used …

// dr.findElement(By.xpath("//android.widget.TextView[@text=“Sale Order”]")).click();;

 //   dr.findElementByXPath("//android.widget.TextView[@text=\"Sale Order\"]").click();
    
 
  WebElement saleord =  dr.findElement(By.xpath("//android.widget.TextView[@text=\"Sale Order\"]"));
  TouchAction act = new TouchAction((MobileDriver)dr);
  act.tap(saleord).perform();

Kindly suggest what other options i can try.

Thanks in advance

You should try a driver.getPageSource() at that point in your tests and look into the xml output for the control.