如何确定 Android UI 元素的 XPATH.硒 + Appium [英] How to determine the XPATH of Android UI elements. Selenium + Appium

查看:23
本文介绍了如何确定 Android UI 元素的 XPATH.硒 + Appium的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用 Appium 和 Selenium 自动化一个 android 应用程序,并且在通过 ID 定位元素时遇到了一些问题.我想使用 XPATH 但不知道如何获取 android UI 元素的 XPATH.有谁知道如何确定元素的 XPATH 或知道可以快速完成这项工作的工具吗?谢谢!

I am currently working on automating an android application using Appium and Selenium and have run into some problems with locating elements by ID. I want to use XPATH but do not know how to get the XPATH of android UI elements. Does anyone know how to determine the XPATH of an element or know of a tool that can do this work quickly? Thanks!

推荐答案

你可以使用 android sdk 工具 - uiautomatorviewer( https://developer.android.com/tools/testing/testing_ui.html) 它就像 appium 检查器,但对我来说效果更好.

You can use android sdk tool - uiautomatorviewer( https://developer.android.com/tools/testing/testing_ui.html) it's like appium inspector, but work better for me.

这篇关于如何确定 Android UI 元素的 XPATH.硒 + Appium的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆