Pybot - how to specify an xpath for an "a href" link
<p>I am trying to run a very simple test with pybot using the xpath but for some reason it keeps saying that my xpath is not a valid, even though I am following the documentation straight from <a href="http://robotframework.org/Selenium2Library/Selenium2Library.html" rel="nofollow">http://robotframework.org/Selenium2Library/Selenium2Library.html</a></p>

<p>This is all I have in my test:</p>

<pre><code>Temp test
    Set Selenium Timeout   60s
    Set Selenium Speed   1s
    Open Browser  http://google.com  chrome
    Click Link  xpath=//a[@href=âhttps://mail.google.com/mail/?tab=wm&amp;authuser=0']
    Sleep 3s
    Close All Browsers
</code></pre>

<p>But for whatever reason it keeps complaining </p>

<p>Message: invalid selector: Unable to locate an element with the xpath expression //a[@href=â/â] because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//a[@href=â/â]' is not a valid XPath expression.</p>

<p>I have seen other people follow the same format with no issues. I have also never had issues with xpath expressions for selenium with java in the past. </p>

<p>Notice how your opening quote is different from the closing one?</p>

<p>Change the <code>â</code> in your syntax to a proper <code>'</code> -- and check that the close-quote in your real code is also a genuine ASCII-character-39 single-quote, not some fancy Unicode curly created by being copied/pasted through Microsoft applications or such.</p>

python selenium xpath robotframework