from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
driver = webdriver.Firefox()
driver.get("http://www.google.com")
elem = driver.find_element(By.ID, "inputWrapper")
elem.clear()
elem.send_keys("Hello world!")
elem.send_keys(Keys.RETURN)
driver.close()