title: click youtube button selenium python check my code
body: <p>I am trying to click using class to video on youtube</p>
  
  <p>In this page <a href="https://likesrock.com" rel="nofollow noreferrer">https://likesrock.com</a> using this code</p>
  
  <pre><code>from selenium import webdriver
  from selenium.common.exceptions import TimeoutException
  from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
  from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0
  from selenium.webdriver.common.keys import Keys
  
  driver = webdriver.Firefox()
  driver.get("https://likesrock.com")
  
  element = driver.find_element_by_class_name("ytp-large-play-button ytp-button")
  element.click()
  </code></pre>
  
  <p>but the compilor give me this error</p>
  
  <blockquote>
    <p>Traceback (most recent call last):
      File "C:\Users\youssef\Desktop\python project\xpath.py", line 25, in 
        element = driver.find_element_by_class_name("ytp-large-play-button ytp-button")
      File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 413, in find_element_by_class_name
        return self.find_element(by=By.CLASS_NAME, value=name)
      File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 752, in find_element
        'value': value})['value']
      File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute
        self.error_handler.check_response(response)
      File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
        raise exception_class(message, screen, stacktrace)
    NoSuchElementException: Message: Unable to locate element: .ytp-large-play-button ytp-button</p>
  </blockquote>
  
  <p>please help</p>