${a}                                        Get Text                                    //android.widget.TextView[contains(@text,"历史位置")]/../../../android.widget.LinearLayout[@index="1"]/android.widget.LinearLayout[@index="1"]/android.widget.TextView

会报错,参数不是有效的。

所以在安卓中,一般使用

    ${mytext}=                           Get Element Attribute            ${a}             text

这样就不会报错了

    Element Should Contain Text                ${Text}                         稿件库

这个方式也可以。

Click Text                                  ${LOCATION}                     exact_match=True
点击文本时,如果完全匹配的文本,将exact_match设置为True。

 

相关文章:

  • 2021-10-19
  • 2021-07-19
  • 2021-04-30
  • 2021-08-20
  • 2021-12-09
  • 2021-08-20
  • 2021-08-05
猜你喜欢
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2021-11-02
  • 2021-07-29
  • 2021-07-30
相关资源
相似解决方案