from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.implicitly_wait(40)
driver.get("https://www.youtube.com/")
elem = driver.find_element_by_name("search_query")
elem.clear()
elem.send_keys("python")
elem.send_keys(Keys.RETURN)
This code suppose to send "python" in the web page's search box and fetch a new web page but its not working and I have no idea why.