I am trying to execute multiple keywords if a condition evaluates as true.
I tried to do something like this
*** Test Cases ***
| Example
*** Keywords ***
| Example
| | ${title}= Get Title
| | Run Keyword If | '${title}' == 'Some Title'
| | ... Click Element | xpath=some element
| | ... Element Text Should Be | xpath=some element | some text
| | ... Else
| | ... Click Element | xpath=other element
The error I get when running this is that the Click Element expects 1 argument but gets 4.
I know that I can set the if statement in the Test cases section and if evaluated true it will run a keyword with all the stuff I want but I wonder if there is a way to do it from the Keywords section.
Thanks.
Run Keywords
make sure to use capitalAND
(needed when using keywords with arguments as per documentation) – Exert