Element Watcher in Appium (iOS and Android)

I am working with Appium and am stuck on a problem where a popup comes over the screen and causes the test to fail. The popup can appear on any screen anytime. I need to click the dismiss button on the popup to dismiss the popup, but I don’t know when it will appear. Does appium provide custom watchers where I can register a watcher, which will trigger when it does not find an element and continue with the flow after clicking on it? Something like https://developer.android.com/reference/androidx/test/uiautomator/UiWatcher

Hi Vidur,
Did you find any solution for watcher in appium?


You may try https://github.com/appium/appium-uiautomator2-driver#mobile-scheduleaction