We are trying to automate the basic modules in the mobile app and we have written scripts also. When we execute the scripts immediately after recording then it works fine. But, when we execute the same after some time then it is showing an error and the test stops suddenly. The error we are getting is ‘No such element exception: An element cannot be located on the page using given parameters.’ But the XPath of the element is the same static and it is not dynamic. This issue happens mostly for the button elements.
So, could you please let me know if we missed something?