Appium - Measuring UI Response Time

Hi, I am trying to capture the response time of a screen on a native app in Android and iOS (from the moment a user clicks on a button to when the screen is displayed).

In one example scenario, when a user clicks on a tab and navigates to a screen, it takes 2 seconds manually. However, by means of automating through Appium scripts, it shows 3 to 4 seconds. I have a start clock after clicking element and end clock after verifying element.

Is there a way to determine the time between requests or perhaps “how long” it takes to verify an element using the locator strategy? Because I am not receiving the accurate response time.

Also, how long does it take for an element to be verified by the Appium driver for each locator strategy, including XPath, ID, Accessibility ID, iOS-Predicate Strings, etc.?

This applies both to Android and iOS. I would like to capture the accurate response time when a user navigates between screens on a native app in both Android and iOS.

Thanks for your support.