jeudi 17 octobre 2019

How to Log either of the 2 messages if its corresponding condition is satisfied

My Code looks like : ${tempclosed} ${value}= Run Keyword And Ignore Error Element Should Not Be Visible ${orderonline}

Run Keyword If '${tempclosed}' == 'TRUE' log Store is Closed on Zomato Or is Temporarily Closed Element Should Be Visible ${overview}

Sleep 3s

Run Keyword Unless '${tempclosed}' == 'FALSE' log Store is Open on Zomato

"here if ${tempclosed} element is found on GUI i want the message to be logged as "Store is Closed on Zomato Or is Temporarily Closed" and if ${tempclosed} element is not found then log "Store is Open on Zomato", considering the test should continue to pass "

the current output that i get is : it logs the second message "Store is Open on Zomato" in both the cases.

How do I get the first message logged when that element is found ?

Aucun commentaire:

Enregistrer un commentaire