【问题标题】:Can bounds(co-ordinates) be used while identifying an element on an Android App?在识别 Android 应用程序上的元素时可以使用边界(坐标)吗?
【发布时间】:2015-08-22 22:45:26
【问题描述】:

这样的东西可以吗?好吧,它不适合我。伙计们,使它工作的最正确方法是什么?需要帮助(Appium 版本 - 1.4.0.0 和 Selenium 2.4.5)

dr.findElement(By.xpath("//android.widget.ImageButton[@bounds='[9,288][144,318]']"))
  .click();

【问题讨论】:

    标签: java android selenium appium


    【解决方案1】:

    试试下面的代码,它对我有用...

    WebElement abc = driver.findElement(By.xpath ("//android.widget.ImageButton[@bounds='[9,288][144,318]']"))
    
    abc.click();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-26
      • 2011-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多