title: Following Selenium IDE to Python - No such element
body: <p>This is my first experience with Selenium and HTML.</p>
  
  <p>I tried to use IDE and then follow "the way" it indicated.
  My IDE recorded script says</p>
  
  <pre><code>Command | Target
  -----------------------------------------------
  click   | css=#hamburger-btn
  click   | css=div.menu-item.menu-item-selected &gt; span.menu-item-title
  click   | css=div.menu-item.menu-item-selected &gt; div.menu-panel-content &gt; div.menu-category-cont &gt; div.menu-category-sub &gt; div.menu-category-sub-item.menu-category-sub-item-selected &gt; span.menu-category-sub-item-title
  </code></pre>
  
  <p>And I tried to implement it this way:</p>
  
  <pre><code>browser = webdriver.Chrome()
  browser.get(url) #url was defined before
  browser.find_element_by_css_selector("#hamburger-btn").click()
  browser.find_element_by_css_selector("div.menu-item.menu-item-selected&gt;span.menu-item-title").click()
  browser.find_element_by_css_selector('div.menu-item.menu-item-selected&gt;div.menu-panel-content&gt;div.menu-category-cont&gt;div.menu-category-sub&gt;div.menu-category-sub-item.menu-category-sub-item-selected&gt;span.menu-category-sub-item-title').click()
  </code></pre>
  
  <p>but I get this "No such element" message/error</p>
  
  <pre><code>browser.find_element_by_css_selector('div.menu-item.menu-item-selected&gt;div.menu-panel-content&gt;div.menu-category-cont&gt;div.menu-category-sub&gt;div.menu-category-sub-item.menu-category-sub-item-selected&gt;span.menu-category-sub-item-title').click()
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 597, in find_element_by_css_selector
  return self.find_element(by=By.CSS_SELECTOR, value=css_selector)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 966, in find_element
  'value': value})['value']
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute
  self.error_handler.check_response(response)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
  raise exception_class(message, screen, stacktrace)
  selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"div.menu-item.menu-item-selected&gt;div.menu-panel-content&gt;div.menu-category-cont&gt;div.menu-category-sub&gt;div.menu-category-sub-item.menu-category-sub-item-selected&gt;span.menu-category-sub-item-title"}
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks</p>
  
  <p>GB</p>