I have found getpass does not work in PyCharm. It just hangs.
In fact is seems msvcrt.getch and raw_input also don\'t work, so perhaps the issue is not with getpass
At first use, my code in pycharm and then click the "Run" then click the "Edit Configurations" then select the 'Emulate terminal in output console'
from selenium import webdriver
from getpass import getpass
email=input("Enter the email:")
password= getpass("Enter the password:")
driver=webdriver.Chrome()
url='https://www.facebook.com/'
driver.get(url)
user_id=driver.find_element_by_id("email")
user_id.send_keys(email)
user_password=driver.find_element_by_id("pass")
user_password.send_keys(password)
login_button =
driver.find_element_by_id("u_0_b").click()
time.sleep(30)