【发布时间】:2020-03-26 17:47:04
【问题描述】:
我是 Appium 测试新手。我能够设置一切并运行测试。我使用 UiAutomatorViewer 来访问一些按钮,现在我需要单击一个按钮,但我刚刚得到了 Cont-desc。我尝试了以下 XPath,但最终出现错误。任何帮助都会很好。
- @FindBy(xpath = "//*[@contentDescription='SIGN IN log in ']")
- driver.FindElement(By.XPath("//android.widget.Button[@content-desc='SIGN IN log in ']")).Click();
- driver.FindElement(By.Name('SIGN IN log in ')).Click();
- driver.FindElement(By.Xpath(//*[@Class='android.view.View' OR @content-desc='SIGN IN log in '])).Click();
【问题讨论】:
-
点击上一层怎么办?
标签: android appium android-uiautomator