Aug-10-2018, 10:16 PM
Hi,
I'm trying to make a program that will log me into my yahoo email. This is "homework" from the famous book Automate the Boring Stuff with Python.
I'm trying to make a program that will log me into my yahoo email. This is "homework" from the famous book Automate the Boring Stuff with Python.
#! python3 # sel2.py - Takes your email and password to log-in to your yahoo email. from selenium import webdriver import time def my_func(take_em, take_pw): browser = webdriver.Firefox() browser.get('https://mail.yahoo.com') emailElem = browser.find_element_by_id('login-username') emailElem.send_keys(take_em) emailElem.submit() time.sleep(10) passwordElem = browser.find_element_by_id('login-passwd') passwordElem.send_keys(take_pw) passwordElem.submit() def test_it(*args): my_func(*args) if __name__ == '__main__': email = input("Please add your email: ") passw = input("Please add your password: ") test_it(email, passw)The program accepts my email but not the password. It pastes pass into the box but then page refreshes ( or that's what it looks like to me ). I would appreciate if someone who has yahoo email would try it.