title: Selenium - how to reliably click on text? Still not entirely solved
body: <p>I am trying to click on text links and that does not work:</p>
  
  <pre><code>from selenium import webdriver
  driver = webdriver.Firefox()
  driver.get("https://my.gumtree.com/login")
  driver.find_element_by_name("username").send_keys(email)
  driver.find_element_by_id("existingUser").click()
  driver.find_element_by_id("fld-password").send_keys(password)
  driver.find_element_by_xpath("//*[contains(text(), 'Continue')]").click() # works
  
  driver.get("https://my.gumtree.com/postad")
  driver.find_elements_by_xpath("//*[text()='For Sale']")[-1].click() # this now works, thanks
  # driver.find_element_by_xpath("//*[contains(@span,'Appliances']").click() # this worked but I need the next line instead
  driver.find_element_by_xpath("//span[text()[normalize-space()='Phones, Mobile Phones &amp; Telecoms']]").click() # this does not work
  driver.find_element_by_xpath("//span[text()[normalize-space()='Phones, Mobile Phones &amp;amp; Telecoms']]").click() # this does not work either
  driver.find_element_by_xpath("//span[text()[normalize-space()='Mobile Phones']]").click()
  driver.find_element_by_xpath("//span[text()[normalize-space()='Other']]").click()
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;li class="border-b is-parent" data-category-name="Appliances" data-category-url="kitchen-appliances" data-category-id="2485" data-category-children="true"&gt;
    &lt;span class="category-name"&gt;
      &lt;span class="category-list-control is-parent"&gt;
      &lt;/span&gt;
      Appliances
    &lt;/span&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>What do I do wrong?</p>
  
  <p>text text text text text text text text text text text text text text text text text </p>