I want to download report from ADP platform through webdriver, but I can't locate the login page password box. Can anyone help me, thanks a lot! Blow is my part code:
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")
I try to find it by XPATH and ID, and also add wait code, but none of them worked. Moreover, it is not in ifame.
The selector seems ok. I think the problem is in the application. When running the test the application shows an error when next button is clicked.
You can try with this as well:
The easiest way to wait for the elements is to set implicit wait: