Multiple Logical conditions in single step

2,101 views
Skip to first unread message

tmpalaniselvam

unread,
Dec 27, 2010, 8:34:17 AM12/27/10
to robotframework-users
Hi,
I'm developing generic high level keywords for my tests. Sometimes I
have to use multiple conditions with AND or OR logic.

Scenario:
Generic function with boolean (Expected) argument to handle error
popup windows.
If true is passed and Error window did not appear, then test should be
failed.
If false is passed and Error window appears, then test should be
failed and error msg should be return..

Just would like to know, Is it possible with current framework
keywords?

Thanks,
Palani.

Pekka Klärck

unread,
Dec 28, 2010, 5:24:55 PM12/28/10
to palani...@gmail.com, robotframework-users
2010/12/27 tmpalaniselvam <palani...@gmail.com>:

First of all you need a keyword that can verify is the error window
open or not. Otherwise you should be able to do this with Run Keyword
If and other Run Keyword variants.

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

tmpalaniselvam

unread,
Jan 3, 2011, 7:54:43 AM1/3/11
to robotframework-users
Hi All,
I got a reply from GerardH and it seems working fine.

${testCasePassed}= | ... any evaluation ...
${errorMessageAppeared}= | RunKeywordAndIgnoreError | SelectDialog |
Error Message
RunKeywordIf | ${testCasePassed} and '${errorMessageAppeared}'=='PASS'
| HandleError

Reply all
Reply to author
Forward
0 new messages