I have below keyword my robot framework -
After flow execution, In Test Cleanup I check for ${TEST_STATUS} whether its PASS or FAIL.
Even if my below keyword failed , in report that it shows only inline keyword as failed
Wait Until Element Is Visible ${heading_successful_xpath} ${wait_time}
But when I am reading final status in Test Cleanup using ${TEST_STATUS}, it always showing PASS
IF I only use below code
Wait Until Element Is Visible ${heading_successful_xpath} ${wait_time}
Then it giving proper status in ${TEST_STATUS}
Verify created successful page
Capture screenshot image proof page
${keyword_status}= Run Keyword And Return Status Wait Until Element Is Visible ${heading_successful_xpath} ${wait_time}
IF "${keyword_status}" == "False"
Save Html Page Source proof page
END
I am not blaming this keyword- [Run Keyword And Return Status]
This keyword is at all working fine giving correct PASS and FAIL status correctly. But overall report created by robot always be PASS even if any keyword failed
e.g.
${keyword_status}= Run Keyword And Return Status wait until element is visible ${presentation_of_form_369_by_file_link_xpath}
In above case if my wait until is failed then it showing as failed there and also Run Keyword And Return Status returning FAIL which is also expected
But overall status of report remains ALL PASS because of use this keyword -Run Keyword And Return Status
I tried this only keyword -
wait until element is visible ${presentation_of_form_369_by_file_link_xpath}
Then overall report status is FAIL which expected as my this keyword is failing
Robot return overall test status in ${TEST_STATUS} where this status is impacted due to use of Run Keyword And Return Status