Element not found error showing, but element exist on the page

Sometimes "Element not found" error showing, but element exit on the page.

Actually I don’t understand why it’s happened?, is there any solution ?
What is possible cause?

  1. what is your default timeout?
  2. when it happens try get pageSource and see that element you are looking for 100% on screen
  3. what exactly fails? is it same step or random? what it most frequent?
  1. I don’t know how i can change default timeout, could you please tell me?
  2. I will try to make sure it
  3. It’s random, not at same step.

This is a good article about timeouts in appium

give example how you look for elements. and example of fail in code plus few lines before.

also with iOS sometimes when we have animation running it may fail. normally i add 0.1-0.5sec delay in such case or retry tap logic (sometimes one sometimes another logic is better)