I need to login to yahoo email account using Selenium with Python.
this is my code
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("https://login.yahoo.com")
print driver.current_url
logintxt = driver.find_element_by_name("username")
logintxt.send_keys("email")
pwdtxt = driver.find_element_by_name("passwd")
pwdtxt.send_keys("pass")
button = driver.find_element_by_id("login-signin")
button.click()
driver.get("https://mail.yahoo.com")
print driver.current_url
but when I print the current url, it always gives me the login page, which mean that it didn't login.
any idea about how to fix it ? I'm using Centos 6 with python 2.6