You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用WebDriver无法定位ADP登录页面密码框求助

ADP登录页面密码框定位失败求助

我希望通过WebDriver从ADP平台下载报表,但无法定位登录页面的密码框。尝试了XPATH、ID定位方式,也添加了等待代码,但均无效,且确认密码框不在iframe中。以下是我的部分代码、ADP登录页截图及报错截图,恳请大家帮忙!

print("start to login")
chrome.get('https://online.adp.com/signin/v1/?APPID=WFNPortal&productId=80e309c3-7085-bae1-e053-3505430b5495&returnURL=https://workforcenow.adp.com/&callingAppId=WFN&TARGET=-SM-https://workforcenow.adp.com/theme/unified.html')
wait.until(lambda x: x.find_elements(By.TAG_NAME, 'input'))
user_name=chrome.find_element(By.XPATH, '//*[@id="login-form_username"]')
user_name.send_keys('phenix.gao')

wait.until(lambda x: x.find_element(By.ID, "verifUseridBtn"))
chrome.find_element(By.ID, "verifUseridBtn").click()

print("input ps")
time.sleep(3)
# wait.until(lambda x: x.find_element(By.XPATH,'//*[@id="login-form_password"]'))
# wait.until(lambda x: x.find_element(By.ID, "login-form_password"))
chrome.find_element(By.ID, "login-form_password").send_keys('123')

print("click login button")
wait.until(lambda x: x.find_elements(By.ID,'signBtn'))
chrome.find_element(By.ID,'signBtn').click()

wait.until(lambda x: x.find_element(By.XPATH, '//*[@title="Dashboards"]'))
print("login success")

ADP登录页截图
报错截图

内容的提问来源于stack exchange,提问作者Phenix

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.11 02:45:35