备忘:滑动幅度不大的时候,记得修改百分比

    [Arguments]    ${需要找的文本}
    ${height}    Get Window Height
    ${width}    Get Window Width
    ${x-start}    Evaluate    ${width}*0.1
    ${x-end}    Evaluate    ${width}*0.1
    ${y_start}    Evaluate    ${height}*0.9
    ${y_end}    Evaluate    ${height}*0.4
    FOR    ${i}    IN RANGE    50
        ${s}    Run Keyword And Return Status    Wait Until Page Contains Element    xpath=//*[@text='${需要找的文本}']
        Run Keyword if    ${s}==True    Exit For Loop
        swipe    ${x-start}    ${y_start}    ${x-end}    ${y_end}
    END

RF + Appiumlibrary 滑动找到对应元素后停止

相关文章:

  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2021-12-26
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
猜你喜欢
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-21
相关资源
相似解决方案