worker-automate-hub 0.5.54__py3-none-any.whl → 0.5.55__py3-none-any.whl

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.
@@ -3644,35 +3644,56 @@ async def nf_devolucao_liquidar_cupom(num_nota_fiscal: str, data_atual: str) ->
3644
3644
  liquidar_button.click_input()
3645
3645
 
3646
3646
  await worker_sleep(3)
3647
- confirm_pop_up = await is_window_open_by_class("TMessageForm","TMessageForm")
3648
- if confirm_pop_up["IsOpened"] == True:
3649
- capture_text_ocr = await ocr_by_class(num_nota_fiscal,"TMessageForm","TMessageForm")
3650
- if capture_text_ocr.sucesso == True:
3651
- msg_result = capture_text_ocr.retorno
3652
- if "deseja realmente" in msg_result.lower():
3653
- app_confirm = Application().connect(class_name="TMessageForm")
3654
- main_window_confirm = app_confirm["TMessageForm"]
3655
-
3656
- btn_yes = main_window_confirm["&Yes"]
3657
- try:
3658
- btn_yes.click()
3659
- await worker_sleep(3)
3660
- console.print("O botão Yes foi clicado com sucesso.", style="green")
3661
- #main_window.close()
3662
- except:
3647
+ i = 0
3648
+ max_attempts = 2
3649
+ while i <= max_attempts:
3650
+ confirm_pop_up = await is_window_open_by_class("TMessageForm","TMessageForm")
3651
+ if confirm_pop_up["IsOpened"] == True:
3652
+ capture_text_ocr = await ocr_by_class(num_nota_fiscal,"TMessageForm","TMessageForm")
3653
+ if capture_text_ocr.sucesso == True:
3654
+ msg_result = capture_text_ocr.retorno
3655
+ if "deseja realmente" in msg_result.lower():
3656
+ app_confirm = Application().connect(class_name="TMessageForm")
3657
+ main_window_confirm = app_confirm["TMessageForm"]
3658
+
3659
+ btn_yes = main_window_confirm["&Yes"]
3660
+ try:
3661
+ btn_yes.click()
3662
+ await worker_sleep(3)
3663
+ console.print("O botão Yes foi clicado com sucesso.", style="green")
3664
+ i = i+1
3665
+ #main_window.close()
3666
+ except:
3667
+ return RpaRetornoProcessoDTO(
3668
+ sucesso=False,
3669
+ retorno=f"Não foi possivel clicar em Yes durante para a confirmação da liquidação do titulo",
3670
+ status=RpaHistoricoStatusEnum.Falha,
3671
+ tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
3672
+ )
3673
+ elif "bloquear" in msg_result.lower():
3674
+ app_confirm = Application().connect(class_name="TMessageForm")
3675
+ main_window_confirm = app_confirm["TMessageForm"]
3676
+
3677
+ btn_yes = main_window_confirm["&No"]
3678
+ try:
3679
+ btn_yes.click()
3680
+ await worker_sleep(3)
3681
+ console.print("O botão Yes foi clicado com sucesso.", style="green")
3682
+ i = i+1
3683
+ except:
3684
+ return RpaRetornoProcessoDTO(
3685
+ sucesso=False,
3686
+ retorno=f"Não foi possivel clicar em Yes durante para a confirmação da liquidação do titulo",
3687
+ status=RpaHistoricoStatusEnum.Falha,
3688
+ tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
3689
+ )
3690
+ else:
3663
3691
  return RpaRetornoProcessoDTO(
3664
3692
  sucesso=False,
3665
- retorno=f"Não foi possivel clicar em Yes durante para a confirmação da liquidação do titulo",
3693
+ retorno=f"POP não mapeado: {msg_result}",
3666
3694
  status=RpaHistoricoStatusEnum.Falha,
3667
3695
  tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
3668
3696
  )
3669
- else:
3670
- return RpaRetornoProcessoDTO(
3671
- sucesso=False,
3672
- retorno=f"POP não mapeado: {msg_result}",
3673
- status=RpaHistoricoStatusEnum.Falha,
3674
- tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
3675
- )
3676
3697
 
3677
3698
  console.print('Aguardando a confirmação de Liquidação realizado com sucesso')
3678
3699
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.54
3
+ Version: 0.5.55
4
4
  Summary: Worker Automate HUB é uma aplicação para automatizar rotinas de RPA nos ambientes Argenta.
5
5
  Author: Joel Paim
6
6
  Requires-Python: >=3.12,<4.0
@@ -73,10 +73,10 @@ worker_automate_hub/utils/get_creds_gworkspace.py,sha256=ZJ0IIEjM4IXIV9rwfbOZ1V1
73
73
  worker_automate_hub/utils/logger.py,sha256=FYV9fg0_RAYJF_ZOCJEbqQAiCXlXk2gMpvUU1rzT_xs,671
74
74
  worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg3Ft68,1162
75
75
  worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
76
- worker_automate_hub/utils/util.py,sha256=ch8qDZfKBHCYKKjblVSQ4X07m9AsYpOPD5RflaipDm0,159514
76
+ worker_automate_hub/utils/util.py,sha256=QyUS_Ee3KbUxsoApJOdLkNZnGphCixHMkzTOHNkgAUo,160740
77
77
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=iYpOs7fb7C3bY61QHySr00xlDNzrrCP0zaexOpBPuaQ,31930
78
78
  worker_automate_hub/worker.py,sha256=CT-poyP1ZYvubArYsnnNd9oJ53SPaDwgr6p6keS3nI4,6248
79
- worker_automate_hub-0.5.54.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
80
- worker_automate_hub-0.5.54.dist-info/METADATA,sha256=MpWKhIzCV_6rKtJD-Vfn7LYwGeqXpIfixLPCPDN-vjo,2894
81
- worker_automate_hub-0.5.54.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
82
- worker_automate_hub-0.5.54.dist-info/RECORD,,
79
+ worker_automate_hub-0.5.55.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
80
+ worker_automate_hub-0.5.55.dist-info/METADATA,sha256=_8P796P6IvmTF3wP_pS4LvdDga-f5hDy7HXTmwd3lkw,2894
81
+ worker_automate_hub-0.5.55.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
82
+ worker_automate_hub-0.5.55.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.0.0
2
+ Generator: poetry-core 2.0.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any