worker-automate-hub 0.5.798__tar.gz → 0.5.799__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/PKG-INFO +1 -1
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/pyproject.toml +1 -1
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/abertura_livros_fiscais.py +26 -181
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/README.md +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/ahead_service.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/client.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/datalake_service.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/helpers/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/rdp_service.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/rpa_fila_service.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/rpa_historico_service.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/webhook_service.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/cli.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/config/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/config/settings.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/config.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/core/so_manipulation.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/decorators/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/decorators/deprecation.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/decorators/rate_limit.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/decorators/repeat.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/decorators/retry.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/decorators/singleton.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/decorators/timeit.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dao/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dao/rpa_fila.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dao/rpa_robo.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dto/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dto/rpa_processo_rdp_dto.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dto/rpa_sap_dto.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/cte_manual.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/cte_xml.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/devolucao_ctf.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/devolucao_ctf_35.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_cte_1353.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_cte_333.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_22.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_37.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_503.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/entrada_de_notas_9000.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/extracao_fechamento_emsys.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/extracao_saldo_estoque.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/extracao_saldo_estoque_fiscal.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/fidc_exportacao_docs_portal_b2b.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/fidc_retorno_cobranca.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/geracao_aprovacao_pedidos_novo.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/integracao_contabil.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/integracao_contabil_generica.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/lancamento_pis_cofins.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/lancamento_rateio.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/login_emsys_versao_especifica.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/notas_faturamento_sap.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/opex_capex.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/playground.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/sped_fiscal.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/jobs/transferencias.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/task_definitions.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/task_executor.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/__init__.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/env.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/logger.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/toast.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/updater.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/util.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/utils_nfe_entrada.py +0 -0
- {worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/worker.py +0 -0
|
@@ -7,10 +7,7 @@ import sys
|
|
|
7
7
|
import os
|
|
8
8
|
from pywinauto.findwindows import ElementNotFoundError
|
|
9
9
|
from pywinauto.keyboard import send_keys
|
|
10
|
-
|
|
11
10
|
# sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')))
|
|
12
|
-
|
|
13
|
-
|
|
14
11
|
from worker_automate_hub.utils.logger import logger
|
|
15
12
|
from worker_automate_hub.models.dto.rpa_historico_request_dto import (
|
|
16
13
|
RpaHistoricoStatusEnum,
|
|
@@ -242,7 +239,7 @@ async def abertura_livros_fiscais(task: RpaProcessoEntradaDTO) -> RpaRetornoProc
|
|
|
242
239
|
# Clicando em incluir livro
|
|
243
240
|
try:
|
|
244
241
|
console.print("Clicando em incluir livro")
|
|
245
|
-
cords = (
|
|
242
|
+
cords = (698, 728)
|
|
246
243
|
pyautogui.click(x=cords[0], y=cords[1])
|
|
247
244
|
await worker_sleep(5)
|
|
248
245
|
except:
|
|
@@ -502,181 +499,8 @@ async def abertura_livros_fiscais(task: RpaProcessoEntradaDTO) -> RpaRetornoProc
|
|
|
502
499
|
|
|
503
500
|
main_window.close()
|
|
504
501
|
|
|
505
|
-
await worker_sleep(
|
|
506
|
-
|
|
507
|
-
console.print("Selecionar Livro Saída aberto")
|
|
508
|
-
|
|
509
|
-
# Selecionar linha livro de saída aberto
|
|
510
|
-
# imagem = "assets\\abertura_livros\\livro_saida_aberto.png"
|
|
511
|
-
imagem = "assets\\abertura_livros\\livro_saida_aberto.png"
|
|
512
|
-
|
|
513
|
-
# Tenta localizar a imagem na tela
|
|
514
|
-
localizacao = pyautogui.locateCenterOnScreen(imagem, confidence=0.9)
|
|
515
|
-
|
|
516
|
-
if localizacao:
|
|
517
|
-
print(f"Imagem livro de saída aberto encontrado em: {localizacao}")
|
|
518
|
-
pyautogui.moveTo(localizacao)
|
|
519
|
-
pyautogui.click()
|
|
520
|
-
else:
|
|
521
|
-
console.print("Imagem livro de saída aberto não encontrado na tela.")
|
|
522
|
-
|
|
523
|
-
# Clicar em alterar livro
|
|
524
|
-
# imagem = "assets\\abertura_livros\\alterar_livro.png"
|
|
525
|
-
imagem = "assets\\abertura_livros\\alterar_livro.png"
|
|
526
|
-
# Tenta localizar a imagem na tela
|
|
527
|
-
localizacao = pyautogui.locateCenterOnScreen(
|
|
528
|
-
imagem, confidence=0.9
|
|
529
|
-
) # você pode ajustar o confidence
|
|
530
|
-
|
|
531
|
-
if localizacao:
|
|
532
|
-
print(f"Imagem alterar livro encontrado em: {localizacao}")
|
|
533
|
-
pyautogui.moveTo(localizacao)
|
|
534
|
-
pyautogui.click()
|
|
535
|
-
else:
|
|
536
|
-
console.print("Imagem alterar livro não encontrada na tela.")
|
|
537
|
-
|
|
538
|
-
await worker_sleep(8)
|
|
539
|
-
|
|
540
|
-
# Clicar em Livro fiscal
|
|
541
|
-
# imagem = "assets\\abertura_livros\\livro_fiscal.png"
|
|
542
|
-
imagem = "assets\\abertura_livros\\livro_fiscal.png"
|
|
543
|
-
# Tenta localizar a imagem na tela
|
|
544
|
-
localizacao = pyautogui.locateCenterOnScreen(
|
|
545
|
-
imagem, confidence=0.9
|
|
546
|
-
) # você pode ajustar o confidence
|
|
547
|
-
|
|
548
|
-
if localizacao:
|
|
549
|
-
print(f"Imagem Livro fiscal encontrado em: {localizacao}")
|
|
550
|
-
pyautogui.moveTo(localizacao)
|
|
551
|
-
pyautogui.click()
|
|
552
|
-
else:
|
|
553
|
-
console.print("Imagem Livro fiscal não encontrada na tela.")
|
|
554
|
-
|
|
555
|
-
await worker_sleep(4)
|
|
556
|
-
|
|
557
|
-
# Clicar em Gerar Relatório
|
|
558
|
-
# imagem = "assets\\abertura_livros\\gerar_registros.png"
|
|
559
|
-
imagem = "assets\\abertura_livros\\gerar_registros.png"
|
|
560
|
-
|
|
561
|
-
# Tenta localizar a imagem na tela
|
|
562
|
-
localizacao = pyautogui.locateCenterOnScreen(
|
|
563
|
-
imagem, confidence=0.9
|
|
564
|
-
) # você pode ajustar o confidence
|
|
565
|
-
|
|
566
|
-
if localizacao:
|
|
567
|
-
print(f"Imagem gerar relatório encontrado em: {localizacao}")
|
|
568
|
-
pyautogui.moveTo(localizacao)
|
|
569
|
-
pyautogui.click()
|
|
570
|
-
else:
|
|
571
|
-
console.print("Imagem gerar relatório não encontrada na tela.")
|
|
572
|
-
|
|
573
|
-
await worker_sleep(4)
|
|
574
|
-
|
|
575
|
-
##### Janela Gerar Registro ####
|
|
576
|
-
console.print("Confirmar Registro")
|
|
577
|
-
app = Application().connect(class_name="TMsgBox", timeout=60)
|
|
578
|
-
main_window = app["TMsgBox"]
|
|
579
|
-
main_window.set_focus()
|
|
580
|
-
|
|
581
|
-
# Clicar em Sim
|
|
582
|
-
main_window.child_window(class_name="TBitBtn", found_index=1).click_input()
|
|
583
|
-
|
|
584
|
-
await worker_sleep(4)
|
|
585
|
-
|
|
586
|
-
console.print("Clicar em confirmar")
|
|
587
|
-
app = Application().connect(
|
|
588
|
-
class_name="TPerguntasLivrosFiscaisForm", timeout=60
|
|
589
|
-
)
|
|
590
|
-
main_window = app["TPerguntasLivrosFiscaisForm"]
|
|
591
|
-
main_window.set_focus()
|
|
592
|
-
main_window.child_window(class_name="TButton", found_index=1).click_input()
|
|
593
|
-
|
|
594
|
-
await worker_sleep(60)
|
|
595
|
-
|
|
596
|
-
# Clicar no aviso
|
|
597
|
-
try:
|
|
598
|
-
app_msgbox = Application().connect(class_name="TMsgBox", timeout=10)
|
|
599
|
-
box = app_msgbox["TMsgBox"]
|
|
600
|
-
print("Janela 'TMsgBox' encontrada.")
|
|
601
|
-
box.set_focus()
|
|
602
|
-
box.child_window(class_name="TBitBtn", found_index=0).click_input()
|
|
603
|
-
print("1Clicou no botão 'TBitBtn'.")
|
|
604
|
-
await worker_sleep(5)
|
|
605
|
-
except:
|
|
606
|
-
pass
|
|
607
|
-
await worker_sleep(5)
|
|
608
|
-
try:
|
|
609
|
-
app_msg = Application().connect(class_name="TMessageForm", timeout=10)
|
|
610
|
-
form = app_msg["TMessageForm"]
|
|
611
|
-
console.print("Janela de confirmação 'TMessageForm' encontrada.")
|
|
612
|
-
form.set_focus()
|
|
613
|
-
form.child_window(class_name="TButton", found_index=1).click_input()
|
|
614
|
-
print("2Clicou no botão de confirmação.")
|
|
615
|
-
await worker_sleep(5)
|
|
616
|
-
except:
|
|
617
|
-
pass
|
|
618
|
-
await worker_sleep(5)
|
|
619
|
-
try:
|
|
620
|
-
app_msg = Application().connect(class_name="TMessageForm", timeout=10)
|
|
621
|
-
form = app_msg["TMessageForm"]
|
|
622
|
-
console.print("Janela de confirmação 'TMessageForm' encontrada.")
|
|
623
|
-
form.set_focus()
|
|
624
|
-
form.child_window(class_name="TButton", found_index=0).click_input()
|
|
625
|
-
print("3Clicou no botão de confirmação.")
|
|
626
|
-
await worker_sleep(5)
|
|
627
|
-
except:
|
|
628
|
-
pass
|
|
629
|
-
await worker_sleep(5)
|
|
630
|
-
try:
|
|
631
|
-
app_msg = Application().connect(class_name="TMessageForm", timeout=10)
|
|
632
|
-
form = app_msg["TMessageForm"]
|
|
633
|
-
console.print("Janela de confirmação 'TMessageForm' encontrada.")
|
|
634
|
-
form.set_focus()
|
|
635
|
-
form.child_window(class_name="TButton", found_index=1).click_input()
|
|
636
|
-
print("4Clicou no botão de confirmação.")
|
|
637
|
-
await worker_sleep(5)
|
|
638
|
-
except:
|
|
639
|
-
pass
|
|
640
|
-
await worker_sleep(5)
|
|
641
|
-
try:
|
|
642
|
-
app_msg = Application().connect(class_name="TMessageForm", timeout=10)
|
|
643
|
-
form = app_msg["TMessageForm"]
|
|
644
|
-
console.print("Janela de confirmação 'TMessageForm' encontrada.")
|
|
645
|
-
form.set_focus()
|
|
646
|
-
form.child_window(class_name="TButton", found_index=0).click_input()
|
|
647
|
-
print("5Clicou no botão de confirmação.")
|
|
648
|
-
await worker_sleep(5)
|
|
649
|
-
except:
|
|
650
|
-
pass
|
|
651
|
-
await worker_sleep(5)
|
|
652
|
-
try:
|
|
653
|
-
# Caminho da imagem que deve desaparecer
|
|
654
|
-
console.print("Aguardar carregar dados")
|
|
655
|
-
# imagem = "assets\\abertura_livros\\janela_carregada.png"
|
|
656
|
-
imagem = "assets\\abertura_livros\\janela_carregada.png"
|
|
657
|
-
|
|
658
|
-
# Tempo máximo de espera (em segundos)
|
|
659
|
-
tempo_limite = 600 # 10 minutos
|
|
660
|
-
intervalo = 2 # segundos entre as verificações
|
|
661
|
-
|
|
662
|
-
inicio = time.time()
|
|
663
|
-
|
|
664
|
-
while True:
|
|
665
|
-
localizacao = pyautogui.locateOnScreen(imagem, confidence=0.9)
|
|
666
|
-
|
|
667
|
-
if localizacao:
|
|
668
|
-
print("Imagem ainda presente... aguardando")
|
|
669
|
-
else:
|
|
670
|
-
print("Imagem desapareceu da tela.")
|
|
671
|
-
break # A imagem sumiu, podemos seguir
|
|
672
|
-
|
|
673
|
-
if time.time() - inicio > tempo_limite:
|
|
674
|
-
print("Tempo esgotado. A imagem não desapareceu.")
|
|
675
|
-
break
|
|
502
|
+
await worker_sleep(3)
|
|
676
503
|
|
|
677
|
-
time.sleep(intervalo)
|
|
678
|
-
except:
|
|
679
|
-
pass
|
|
680
504
|
# Conecta na janela principal
|
|
681
505
|
console.print("Janela Livro de Apuração ICMS 2ª Etapa")
|
|
682
506
|
app = Application().connect(class_name="TFrmPrincipalFiscal", timeout=60)
|
|
@@ -712,7 +536,7 @@ async def abertura_livros_fiscais(task: RpaProcessoEntradaDTO) -> RpaRetornoProc
|
|
|
712
536
|
await worker_sleep(2)
|
|
713
537
|
send_keys("{ENTER}")
|
|
714
538
|
|
|
715
|
-
await worker_sleep(5)
|
|
539
|
+
# await worker_sleep(5)
|
|
716
540
|
console.print("Inserindo competência...")
|
|
717
541
|
|
|
718
542
|
# Conecta na janela
|
|
@@ -740,12 +564,32 @@ async def abertura_livros_fiscais(task: RpaProcessoEntradaDTO) -> RpaRetornoProc
|
|
|
740
564
|
# Tenta localizar a imagem na tela
|
|
741
565
|
localizacao = pyautogui.locateCenterOnScreen(
|
|
742
566
|
imagem, confidence=0.9
|
|
743
|
-
)
|
|
744
|
-
|
|
567
|
+
)
|
|
568
|
+
|
|
745
569
|
if localizacao:
|
|
746
570
|
print(f"Imagem incluir apuração encontrado em: {localizacao}")
|
|
747
571
|
pyautogui.moveTo(localizacao)
|
|
748
572
|
pyautogui.click()
|
|
573
|
+
|
|
574
|
+
await worker_sleep(10)
|
|
575
|
+
|
|
576
|
+
imagem = "assets\\abertura_livros\\aviso_erro.png"
|
|
577
|
+
|
|
578
|
+
# Tenta localizar a imagem na tela
|
|
579
|
+
localizacao_erro = pyautogui.locateCenterOnScreen(
|
|
580
|
+
imagem, confidence=0.9
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
if localizacao_erro:
|
|
584
|
+
return RpaRetornoProcessoDTO(
|
|
585
|
+
sucesso=False,
|
|
586
|
+
retorno=f"Erro ao Incluir apuração, situação diferente de confirmado.",
|
|
587
|
+
status=RpaHistoricoStatusEnum.Falha,
|
|
588
|
+
tags=[RpaTagDTO(descricao=RpaTagEnum.Negocio)],
|
|
589
|
+
)
|
|
590
|
+
|
|
591
|
+
main_window.close()
|
|
592
|
+
|
|
749
593
|
console.print("Apuração incluida com sucesso")
|
|
750
594
|
retorno = "Apuração incluida com sucesso"
|
|
751
595
|
return RpaRetornoProcessoDTO(
|
|
@@ -755,6 +599,7 @@ async def abertura_livros_fiscais(task: RpaProcessoEntradaDTO) -> RpaRetornoProc
|
|
|
755
599
|
console.print("Imagem incluir apuração não encontrada na tela.")
|
|
756
600
|
|
|
757
601
|
except Exception as erro:
|
|
602
|
+
|
|
758
603
|
console.print(f"Erro ao executar abertura de livros fiscais, erro : {erro}")
|
|
759
604
|
return RpaRetornoProcessoDTO(
|
|
760
605
|
sucesso=False,
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/__init__.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/ahead_service.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/api/rdp_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/config/__init__.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/config/settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/decorators/repeat.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/decorators/retry.py
RENAMED
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/decorators/timeit.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/tasks/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/__init__.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/env.py
RENAMED
|
File without changes
|
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/logger.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/toast.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/updater.py
RENAMED
|
File without changes
|
{worker_automate_hub-0.5.798 → worker_automate_hub-0.5.799}/worker_automate_hub/utils/util.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|