I have a page that may and may not contain a certain element that will affect all the xpaths.
I need to run a "Run Keyword If" to identify if this element exists and if so to execute another keyword.
I tried to set the "Page Should Contain Element" and "Element Should Be Visible" as variables and pass it in the If statement but it only return None.
What can I use to identify an element in a page?
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