Selenium Webdriver Python未在密码字段上键入

时间:2018-11-21 20:48:16

标签: python selenium google-chrome input webdriver

我编写了此代码,它可以工作,唯一的问题是在密码字段上键入内容。什么也没出现。你能帮我吗?

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import threading

userStr = '555555'
passwordStr = '555555'

browser = webdriver.Chrome()
browser.get(('https://www30.mercantilbanco.com/olb/Login'))

username = browser.find_element_by_css_selector('#userId')
username.send_keys(userStr)

password = browser.find_element_by_css_selector('#password')
username.send_keys(passwordStr)

0 个答案:

没有答案