getpass()函数不允许pycharm中的用户输入密码选项。 我正在尝试使用selenium和我从控制台传递的登录凭据登录网站,但是在使用input()函数输入ID后,密码输入选项不再显示
我的代码-
from selenium import webdriver
import time
from getpass import getpass
username = input("enter your amazon id")
paswd = getpass("enter your password: ")
chrome_path = "C:/Users/shashshe/Downloads/chromedriver_win32 /chromedriver.exe"
driver = webdriver.Chrome(chrome_path)
driver.maximize_window()
driver.get('https://alexa.amazon.in/spa/index.html')
driver.find_element_by_id('ap_email').send_keys(username)
driver.find_element_by_id('ap_password').send_keys(paswd)
driver.find_element_by_id('signInSubmit').click()
time.sleep(10)