elem = driver.find_element_by_name('account')
elem.send_keys('Username')
elem2 = driver.find_element_by_name('pw')
elem2.send_keys('Password')
elem.send_keys(Keys.RETURN)
driver.quit()
Использование Selenium в фоновом режиме