wait = WebDriverWait(driver,10)
try:
if __name__ == '__main__':
driver.get(r"https://certificado.sso.acesso.gov.br/login?client_id=login.esocial.gov.br")
except:
pass
entrarGOV = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="login-acoes"]/div[2]/p/button/b')))
entrarGOV.click() #The code is breaking in this point
time.sleep(5)
certificate = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="login-certificate"]')))
certificate.click()
changeProfile = wait.until(EC.element_to_be_clickable((By.XPATH,'//*[@id="header"]/div[2]/a')))
changeProfile.click()
selectAcess = wait.until(EC.element_to_be_clickable((By.XPATH,'//*[@id="perfilAcesso"]')))
selectAcess.click()
time.sleep(3)
procuradorCNPJ = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="perfilAcesso"]/option[3]')))
procuradorCNPJ.click()
insertCNPJ = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="procuradorCnpj"]')))
insertCNPJ.send_keys(Cnpj)
login = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="btn-verificar-procuracao-cnpj"]')))
login.click()
try:
error= 'O procurador não possui perfil com autorização de acesso à Web'
noAcess=wait.until(EC.presence_of_element_located((By.XPATH,'//*[@id="mensagemGeral"]/div/span')))
if noAcess.text == error:
print('O certificado não possui procuração')
result=1
sys.exit(result)
except TimeoutException:
print('Certificado possui procuração')
pass
generalSelect = wait.until(EC.element_to_be_clickable((By.XPATH, '//*[@id="geral"]/div')))
generalSelect.click()
empresaLogada = wait.until(EC.element_to_be_clickable((By.XPATH,'//*[@id="header"]/div[2]/p[1]/span[3]')))
Empresa = empresaLogada.text
if True:
print('Login bem sucedido na empresa:', Empresa, '. Iniciando o processo.')
#🔒 GetHandler error in selenium
6 messages · Page 1 of 1 (latest)
@prime scroll
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
output:
Erro ao executar o processo de solicitação, tentando novamente em alguns instantes... Message:
Stacktrace:
GetHandleVerifier [0x0122C1C3+27395]
(No symbol) [0x011C3DC4]
(No symbol) [0x010C1B7F]
(No symbol) [0x01102C65]
(No symbol) [0x01102D3B]
(No symbol) [0x0113EC82]
(No symbol) [0x011239E4]
(No symbol) [0x0113CB24]
(No symbol) [0x01123736]
(No symbol) [0x010F7541]
(No symbol) [0x010F80BD]
GetHandleVerifier [0x014E3A93+2876371]
GetHandleVerifier [0x01537F5D+3221661]
GetHandleVerifier [0x012AD634+556916]
GetHandleVerifier [0x012B474C+585868]
(No symbol) [0x011CCE04]
(No symbol) [0x011C9818]
(No symbol) [0x011C99B7]
(No symbol) [0x011BBF0E]
BaseThreadInitThunk [0x7552FCC9+25]
RtlGetAppContainerNamedObjectPath [0x770A80CE+286]
RtlGetAppContainerNamedObjectPath [0x770A809E+238]```
the code was running 10 minutos ago 😦
@prime scroll
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.