is there a way for us to refresh the application's elements present in the DOM? similar to the way you refresh the elements using the Appium Inspector's 'Refresh' button? Imitate the functionality of this button

driver.refresh() only works for web? because when trying to use it to refresh the app's pages (for instance with AndroidDriver<MobileElement> driver) I get an error when trying to use that command...

  • I see. But may I know the necessity of refreshing the android screen? Aug 24, 2022 at 14:13
  • @NarendraChandratre I need to check for dynamic elements in the app, I use wait.until but sometimes it fail to locate the element for some reason… so I wondered if it is possible to refresh the screen.
    – TCAuto
    Aug 25, 2022 at 20:03
  • I see. would like to see how wait.until has been implemented, bcz it should work for all cases. firstly check if after explicit wait its working as expected, so we can refined solution to make it work. Another strategy you might want to try would be using pooling mechanism. Aug 26, 2022 at 15:17
  • @NarendraChandratre So basically I have this element (message that pops up), when trying to do wait.until It WON'T find that element unless I use xpath as the locator... implemented as: wait.until(ExpectedConditions.presenceOfElementLocated(MobileBy.xpath("<xPath>"))); When trying to do locate by MobileBy.id / AccessibilityId no element is found and I get the "timer" exception..
    – TCAuto
    Aug 28, 2022 at 12:04


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.