title: InvalidSelectorException when select element for Python Selenium with xpath
body: <p>I have this html snippet:</p>
  
  <pre><code>&lt;div class="btn"&gt;
      &lt;a href="javascript:void(0)" class="S_btn_b" node-type="OK"&gt;
          &lt;span&gt;确定&lt;/span&gt;
      &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And I want to select the <code>确定</code> element and click it. I tried the following selector with <a href="http://www.w3schools.com/xpath/xpath_syntax.asp" rel="nofollow">xpath</a>:</p>
  
  <pre><code>confirm_btn = driver.find_element_by_xpath('//div[@class="btn"]//span[text()="确定"]')
  </code></pre>
  
  <p>But the program just complain that that is not a valid selector with this Exception:</p>
  
  <pre><code>Traceback (most recent call last):
    File "test.py", line 63, in &lt;module&gt;
      ac.move_to_element(driver.find_element_by_xpath('//div[@class="btn"]/span[text()="确定"'))
    File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 230, in find_element_by_xpath
      return self.find_element(by=By.XPATH, value=xpath)
    File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 662, in find_element
      {'using': by, 'value': value})['value']
    File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 173, in execute
      self.error_handler.check_response(response)
    File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 166, in check_response
      raise exception_class(message, screen, stacktrace)
  selenium.common.exceptions.InvalidSelectorException
  </code></pre>
  
  <p>Did I do something wrong ? </p>