关于this问题,我想使用username
发送password
/ IE
警告输入字段,但密码字段始终为空 - 所有文字转到用户名字段
代码和输出:
from selenium.webdriver.common.keys import Keys
username = "some_user"
password = "some_pass"
driver.switch_to.alert.send_keys(username + Keys.TAB + password)
# text in username field: "some_user.some_pass"
driver.switch_to.alert.send_keys(username + '\t' + password)
# text in username field: "some_user some_pass"
driver.switch_to.alert.send_keys(username + u'u\0009' + password)
# text in username field: "some_user some_pass"
那么如何将光标放到"密码"将密钥发送到"用户名"领域
答案 0 :(得分:0)