I am having trouble clicking on an element using JavaScript for a Selenium Robot Framework script. I keep getting an error message:
unknown error: Runtime.evaluate threw exception: SyntaxError: missing ) after argument list)
Could someone please assist me in correcting my code?
Here is the JavaScript code snippet I have been trying to execute:
document.evaluate('\\span[text()='Participant']', document, null, FIRST_ORDERED_NODE_TYPE, null).click()
In the above code, I am attempting to click on an element that contains the text 'Participant' (the xpath only has the text attribute and no other identifiers). If there are any mistakes in my code, I would greatly appreciate any guidance on how to correct it.