The element does not exist in DOM anymore


Appium throws intermittent error

selenium.common.exceptions.StaleElementReferenceException: Message: The element ' com.androidsample.generalstore:id/productPrice' does not exist in DOM anymore


Test data:
Appium Version: 1.17.1
Python Version: 3.8
IDE: Pycharm

Kindly guide me to resolve above issue.

Best Regards,
Gaurav Valera

Issue is fixed after applying Explicit Wait.In case some one is facing the same issue, do apply following steps:

            wait = WebDriverWait(self.driver, 8)
            wait.until(expected_conditions.presence_of_element_located((By.ID, "productPrice")))

Note: Import necessary packages too :slight_smile:

Which packages require to handle this exception?