2

I am trying to automate a log in but the input is in a Iframe. How can I locate the id of the input?

Link: https://directa.natal.rn.gov.br/open.do?sys=DIR&a=wqf45tfes .

view-source: https://directa.natal.rn.gov.br/open.do?sys=DIR&a=wqf45tfes

My code:

from selenium import webdriver

browser = webdriver.Chrome()
browser.maximize_window()
browser.get('http://directa.natal.rn.gov.br')


username = browser.find_element_by_id('usuario')
username.send_keys('login')

password = browser.find_element_by_id('senha')
password.send_keys('password')
password.submit()

0 Answers0