Line 1 there does find the selector
Wait Until Element Is visible xpath=//a[contains(text(),'Download selected certificate')]
Then when i try to get the href element
${url}= Get Element Attribute xpath=//a[contains(text(),'Download selected certificate')]/@href
It fails Error says
InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression //a[contains(text(),'Download selected certificate')]/ because of the following error: SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//a[contains(text(),'Download selected certificate')]/' is not a valid XPath expression.
Im not sure why as i have a working unrelated example with similar syntax
${url}= Get Element Attribute xpath=//tr[contains(b/span, Jul)][${row_number}]/td[5]/span/a/@href