You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The assertion keywords like "Check if (not) exists" or "row count" would currently immediately fail if the intended check fails - which is basically as expected.
However, in real life it's often needed to wait, until some data appears / disappears in the DB - which takes some time.
This is typically solved with a high level keyword, which repeats the assertion multiple times (with a pause) until the assertion is passed or the timeout is reached. Example:
Wait Row Present In Database
[Arguments] ${SQL} ${Should Be Present}=True ${Timeout}=2 Seconds
${done}= Set Variable ${False}
WHILE not $done limit=${Timeout}
${results}= Query ${SQL Anfrage}
IF ${Should Be Present}
${done}= Evaluate len($results) > 0
ELSE
${done}= Evaluate len($results) < 1
END
IF not $done
Sleep 0.1s
END
END
RETURN ${results}
It would be nice to include such kind of smart waiting directly in the library keywords.
The text was updated successfully, but these errors were encountered:
The assertion keywords like "Check if (not) exists" or "row count" would currently immediately fail if the intended check fails - which is basically as expected.
However, in real life it's often needed to wait, until some data appears / disappears in the DB - which takes some time.
This is typically solved with a high level keyword, which repeats the assertion multiple times (with a pause) until the assertion is passed or the timeout is reached.
Example:
It would be nice to include such kind of smart waiting directly in the library keywords.
The text was updated successfully, but these errors were encountered: