我们如何使用Appium和Java获得精确的时间来加载移动应用程序页面?
嗨,团队,我需要计算移动应用程序页面加载时间,当我们从一个屏幕到另一个屏幕以获取移动应用程序。
我已经尝试了以下方法:
在单击元素之前,在MS中获取当前时间,然后单击该元素,等待可见期望的元素,然后再次将当前时间置于MS并减去时间。
请通过更好的方法来帮助我,以计算准确的页面加载时间。
谢谢。
Hi Team, I need to calculate the Mobile app Page loading time when we navigate from one screen to other screen for Mobile Application.
I have Tried below Approach:
Before Clicking on Element, get the current Time in MS and after clicking on the element, Waiting for expected element to be visible then again getting current time in MS and Subtract the times.
Please Help me out with better approach to calculate accurate page load time.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(3)
您可以将其用于页面加载。不确定Java的方式。
You can use this for page loads. Not sure of the Java way for this.
您可以测量持续时间。
开始加载应用程序/页面时开始秒表。
并在加载最后一个元素时将其停止。
You can measure the duration.
Start stopwatch when you start loading the application/page.
And stop it when the last element is loaded.
嗨,您可以使用秒表类找到加载主页的确切时间。
使用以下代码:
stopwatch loadTime = new stopwatch();
Hi You can find the exact time of loading a homepage by using stopwatch class.
Use below code:
StopWatch loadTime = new StopWatch();