Submit the order certificate II

I can’t order the robot when error shows, my code is like this:

Task
Wait Until Keyword Succeeds 3x 0.5sec Submit the order

Keyword
Submit the order
Click Button order
Page Should Not Contain Element class:alert alert-danger

can anyone help me??

Hi @joao.oliveira and welcome to our forum!

I believe you should retry on clicking the order button again each time you see this element:

<div class="alert alert-danger" role="alert">Unexpected Server Error</div>

Another option is to retry on clicking the order button until you get a receipt, like in this example:

Submit the order
    Click Button    id:order
    FOR    ${i}    IN RANGE    9999999
        ${success} =    Is Element Visible    id:receipt
        Exit For Loop If    ${success}
        Click Button    id:order
    END

Also make sure you’re using in your conda.yaml the latest rpaframework==15.0.0, where you can replace the FOR with WHILE and use a BREAK with an inline IF. (more on Taking Robot Framework 5 into use)