【发布时间】:2020-09-16 02:37:33
【问题描述】:
我用python构建自动登录程序 但是,我什么都不知道
那么,在这种情况下我该怎么办?
html代码
<input type="text" name="uID" value="" class="form-control input-lg" placeholder="ID" autocomplete="off" required="" tabindex="1">
我的代码
my_id2 = 'id'
my_pw2 = 'password'
driver.find_element_by_name('uID').send_keys(my_id2)
driver.find_element_by_name('uPW').send_keys(my_pw2)
错误消息
NoSuchElementException
Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="uID"]"}
(Session info: chrome=85.0.4183.102)
【问题讨论】:
-
您好,请问有什么问题吗?
-
尝试使用 xpath 或 css 选择器
标签: python selenium automation