robotframework-appiumlibrary异步操作循环等待成功标志后再进行下一步

2021-09-29 17:17:31 浏览数 (2)

进入页面A,循环等待推送成功的提示后,点击确定,然后点击操作B进行下一步。

代码语言:javascript复制
    click element    ${myelments['page_action']}
    FOR    ${trycount}    IN RANGE    10
        Wait Until Page Contains    温馨提示    10
        ${status}    Run Keyword And Return Status    page should contain text    推送成功
        click element    ${myelments['alter_confirm']}
        sleep    10
        run keyword if    ${status}==False    click element    ${myelments['page_action']}
        ...    ELSE    Exit For Loop
    END
    click element    ${myelments['page_actionB']}

0 人点赞