def _refresh_element(self, wait_time: Optional[int] = None):
        """Search for the element and update the internal reference.

        Returns:
            WebDriverElement

        Raises:
            ElementDoesNotExist
        """
        element_list = self.find_by(
            self.parent._find_elements,
            finder_kwargs=self._finder_kwargs,
            original_find=self._finder_kwargs["by"],
            wait_time=wait_time,
        )

        # Ensure the correct element is picked and replace old element
        for elem in element_list:
            new_element = elem._element

            if new_element == self._element:
                self._element = new_element
                return self

        raise ElementDoesNotExist("Element was removed from DOM.")
Search for the element and update the internal reference.

        Returns:
            WebDriverElement

        Raises:
            ElementDoesNotExist
        
splinter/driver/webdriver/__init__.py