现在我的代码是
email = 'test@gmail.com'
pwd = 'testing123'
user.send_keys(email)
user.send_keys(pwd)
现在我想从文本文件中读取电子邮件和密码,这是代码上的。
假设我在尝试使用 f 打开的同一文件夹中有一个 info.txt 但它不起作用,我完全迷失了
email = 'test@gmail.com'
pwd = 'testing123'
msg = 'testy123'
driver = webdriver.Chrome('chromedriver.exe', options=options)
driver.get('https://www.randomsite.com')
print ("Logging in and doing requests.")
user = driver.find_element_by_id('login_email')
user.send_keys(email)
password = driver.find_element_by_id('login_password')
password.send_keys(pwd)
梦里花落0921
相关分类