title: Message: no such element: Unable to locate element Selenium Python
body: <p>I am trying to click on a button but getting this error message:
  The element I am trying to click does exist on the page but I am not sure why it's saying that the element does not exist:</p>
  <pre><code>Message: no such element: Unable to locate element: {&quot;method&quot;:&quot;xpath&quot;,&quot;selector&quot;:&quot;//button[@class=&quot;vote_button mfp-voteText&quot;]&quot;}
  </code></pre>
  <p>Below is my code:</p>
  <pre><code>driver.get('https://trupanion.com/canada/members/contest?pixlee_album_photo_id=427049511')
  
  time.sleep(10)
  
  try:
      vote = driver.find_element_by_xpath('//button[@class=&quot;vote_button mfp-voteText&quot;]')
      vote.click()
  except Exception as e:
      print(e)
  </code></pre>
  <p>Below is the XPath in chrome dev tool which shows it's correct:</p>
  <p><a href="https://i.stack.imgur.com/gBaQ0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gBaQ0.png" alt="enter image description here" /></a></p>