-2

Cisco.com recently changed their login page and my selenium program no longer works.

I am trying to input my password with selenium on this cisco login page (https://id.cisco.com/signin)

But for some reason, selenium cannot find the password field.

I tried this, but it times out:

try:
    element_password = EC.presence_of_element_located((By.ID, 'okta-signin-password'))
    WebDriverWait(browser, element_timeout).until(element_password)

    browser.find_element_by_id('okta-signin-password').send_keys(f'{cisco_password}')

except TimeoutException:
    print(Fore.RED + 'Timed out waiting for page to load')
    browser.close()
    quit()

I also tried this xpath, and it still does not work:

try:
    element_password = EC.presence_of_element_located((By.XPATH, 'okta-signin-password'))
    WebDriverWait(browser, element_timeout).until(element_password)

    browser.find_element_by_xpath('//*[@id="okta-signin-password"]').send_keys(f'{cisco_password}')

except TimeoutException:
    print(Fore.RED + 'Timed out waiting for page to load')
    browser.close()
    quit()

enter image description here

4
  • 1
    What error do you see? – João Farias Apr 20 at 7:24
  • Just a side note: Why do you use xPath when you use it only with ids? //*[@id="okta-signin-password"] Let's not make it less readable by using xPath everywhere. – pavelsaman Apr 20 at 7:49
  • your code works fine what is the error – PDHide Apr 20 at 9:54
  • Thank you! The ID tag worked. For some reason I could not get it to work yesterday – Checksum321 Apr 21 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.