Alternative for Sleep keyword?

658 views
Skip to first unread message

antonio III cabreira

unread,
Nov 14, 2011, 7:06:35 AM11/14/11
to robotframework-users
Hi,

The scenario that I am trying to automate is I need to create a
customer. After clicking the create button, a window shows that it is
currently saving (w/ a loading.gif) after which a prompt is displayed
that the creation was successful. Whenever I automate this scenario,
I can only reach the loading part and after that I receive an error. I
think this happens because I need more time before moving to the next
keyword to allow the saving to finish. I am already using the Wait
Until Keyword Succeeds keyword but it does not seem to help. So what I
did, I placed a Sleep keyword after the loading. Is there any keyword
I can use that could check a response from the DB that all the saving
is completed? Or what is the better approach in tackling this kind of
predicament?

Thanks!

Pekka Klärck

unread,
Nov 15, 2011, 6:12:44 PM11/15/11
to antonio.c...@gmail.com, robotframework-users
2011/11/14 antonio III cabreira <antonio.c...@gmail.com>:

Why didn't Wait Until Keyword Succeeds work for you? It's designed to
be used in exactly this kind of situations. Same libraries also
contain some custom Wait Until keywords that might work better than
the generic one. For example, if you are using SeleniumLibrary there
is Wait Until Page Contains that might do exactly what you want.

There are at least two database libraries for Robot but I don't think
they would help you with this problem. They would, however, be very
useful if you want to verify the database contents in general.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Reply all
Reply to author
Forward
0 new messages