2.7 Robot framework (Selenium) | Conditional Functions

preview_player
Показать описание


In this tutorial, you'd learn about conditional functions. Unlike other programming languages, we don't have If Then Else or Switch Case statements in Robot framework. However, we have set of keywords to implement conditional logic. These functions are:

Set Variable If
Get Variable Value
Run Keyword If
Run Keyword Unless
Continue For Loop If
Exit For Loop If
Pass Execution If
Return From Keyword If
Run Keyword And Return If
Run Keyword If All Critical Tests Passed
Run Keyword If All Tests Passed
Run Keyword If Any Critical Tests Failed
Run Keyword If Any Tests Failed
Run Keyword If Test Failed
Run Keyword If Test Passed
Run Keyword If Timeout Occurred

Feel free to ask questions in comments section.

SUBSCRIBE and LIKE to see more videos.
Рекомендации по теме
Комментарии
Автор

Well explained and I learned something which is useful in robot framework to handle exceptional waiting for more videos

harshithmanepalli
Автор

Hello Sir,
Really very good, explained well & coverage is good. 👍😊

Need help in below Test Case,
I have to execute multiple Keywords/Statements within if ${cond} is 'True'

*** Keywords ***
Test Case for Create Record
[Arguments] ${cond}
Run Keyword If ${cond} == 'True' Test Case-1
Run Keyword If ${cond} == 'True' Test Case-2
... ELSE If ${cond} == 'False' Test Case-3
... ELSE If ${cond} == 'False' Test Case-4

So how to write/execute multiple Keywords/statements using IF ELSE ?

sarjeraosandbhor
Автор

i am getting error as No keyword with name 'and' found. for the condition Run Keyword If '${visible_date}' == 'True' and '${enabled_done}' == 'True' Click Element ${DONE_XPATH}

Please help me to tackle this issue

prajaktawalhekar
Автор

Can you please show how to check substring in string using robot framework

sunainasingareddy
join shbcf.ru