如何使用Espresso / UI Automator测试Google Maps信息窗口内容?

发布于 2025-02-08 20:20:28 字数 382 浏览 2 评论 0原文

如何使用Espresso或UI Automator测试Google Map Marker的信息窗口内容,用于自动化测试。

我使用这样的UI-Automator单击地图的标记...

val device = UiDevice.getInstance(getInstrumentation())
val marker = device.findObject(UiSelector().descriptionContains(markerTitle))

if (marker.exists()) {
    marker.click()
}

我尝试使用浓缩咖啡和UI-Automator检查信息窗口内容,但不幸的是它们无法正常工作。还有其他方法可以测试。

谢谢!

How to test Google map marker's info window contents for automation testing using Espresso or UI Automator.

I click on the map's marker using ui-automator like this...

val device = UiDevice.getInstance(getInstrumentation())
val marker = device.findObject(UiSelector().descriptionContains(markerTitle))

if (marker.exists()) {
    marker.click()
}

i tried checking the info window contents with both espresso and UI-automator but unfortunately they are not working. is there any other way to test this.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文