Robot Framework If element is visible execute a keyword
I experienced the same issue, I use this solution:
${present}= Run Keyword And Return Status Element Should Be Visible id=my-element
Run Keyword If ${present} My Cool Keyword
I had similar situation and I used the script below:
${IsElementVisible}= Run Keyword And Return Status Element Should Be Visible ${Element1}
Run Keyword If ${IsElementVisible} MyCase1 ELSE Click Element ${Element2}