worker-automate-hub 0.4.409__py3-none-any.whl → 0.4.410__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.
- worker_automate_hub/tasks/jobs/transferencias.py +102 -98
- {worker_automate_hub-0.4.409.dist-info → worker_automate_hub-0.4.410.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.4.409.dist-info → worker_automate_hub-0.4.410.dist-info}/RECORD +5 -5
- {worker_automate_hub-0.4.409.dist-info → worker_automate_hub-0.4.410.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.4.409.dist-info → worker_automate_hub-0.4.410.dist-info}/entry_points.txt +0 -0
@@ -653,9 +653,8 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
653
653
|
status=RpaHistoricoStatusEnum.Falha,
|
654
654
|
)
|
655
655
|
|
656
|
-
await worker_sleep(
|
656
|
+
await worker_sleep(5)
|
657
657
|
|
658
|
-
# screenshot_path = take_screenshot()
|
659
658
|
# Message 'Deseja pesquisar pré-venda?'
|
660
659
|
console.print(
|
661
660
|
"Verificando a existencia da mensagem: 'Deseja pesquisar pré-venda?'...\n"
|
@@ -704,111 +703,116 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
704
703
|
status=RpaHistoricoStatusEnum.Falha,
|
705
704
|
)
|
706
705
|
|
707
|
-
# message_prevenda = take_target_position(screenshot_path, "Deseja")
|
708
|
-
# if message_prevenda is not None:
|
709
|
-
# button_yes = find_target_position(screenshot_path, "Yes", attempts=5)
|
710
|
-
# if button_yes is not None:
|
711
|
-
# pyautogui.click(button_yes)
|
712
|
-
# else:
|
713
|
-
# pyautogui.click(914,560)
|
714
|
-
# console.log('Clicou em "Yes" para confirmar pré-venda', style="bold green")
|
715
|
-
# else:
|
716
|
-
# log_msg = f"Mensagem 'Deseja pesquisar pré-venda?' não encontrada."
|
717
|
-
# console.print(log_msg, style="bold yellow")
|
718
|
-
await worker_sleep(5)
|
719
706
|
|
720
|
-
|
721
|
-
# button_confirma_transferencia = take_target_position(screenshot_path, "confirma")
|
722
|
-
# if button_confirma_transferencia is not None:
|
723
|
-
# pyautogui.click(button_confirma_transferencia)
|
724
|
-
# console.log("Confirmou Pré-venda da transferencia", style="bold green")
|
725
|
-
# else:
|
726
|
-
# log_msg = f"Botao 'Confirma' não encontrado"
|
727
|
-
# console.print(log_msg, style="bold yellow")
|
728
|
-
|
729
|
-
# Clica em "Yes" para confirmar a pré-venda
|
730
|
-
# confirma_pre_venda = (921, 562)
|
731
|
-
# pyautogui.click(confirma_pre_venda)
|
732
|
-
# console.log('Clicou em "Yes" para confirmar pré-venda', style="bold green")
|
707
|
+
await worker_sleep(5)
|
733
708
|
|
734
709
|
# Confirma pré-venda
|
735
710
|
# Pode não precisar em descartes, mas em trânsferencias é obrigatório
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
if confirma_pre_venda.
|
742
|
-
confirma_pre_venda.
|
743
|
-
|
744
|
-
|
745
|
-
|
711
|
+
try:
|
712
|
+
app = Application().connect(class_name="TFrmPreVenda")
|
713
|
+
pre_venda = app["TFrmPreVenda"]
|
714
|
+
confirma_pre_venda = pre_venda.child_window(title="&Confirma", class_name="TBitBtn")
|
715
|
+
|
716
|
+
if confirma_pre_venda.exists():
|
717
|
+
if confirma_pre_venda.is_enabled():
|
718
|
+
confirma_pre_venda.click()
|
719
|
+
else:
|
720
|
+
log_msg = f"Botao 'Confirma' nao encontrado"
|
721
|
+
console.print(log_msg, style="bold yellow")
|
722
|
+
except Exception as e:
|
723
|
+
return RpaRetornoProcessoDTO(
|
724
|
+
sucesso=False,
|
725
|
+
retorno=f"Falha ao clicar no botão 'Confirma': {e}",
|
726
|
+
status=RpaHistoricoStatusEnum.Falha,
|
727
|
+
)
|
728
|
+
# pyautogui.moveTo(1200, 300)
|
729
|
+
await worker_sleep(5)
|
746
730
|
|
747
|
-
|
731
|
+
console.print("Verificando a mensagem: Confirmar transferencia...\n")
|
732
|
+
try:
|
733
|
+
app = Application().connect(class_name="TMessageForm")
|
734
|
+
cofirma_pre_venda = app["TMessageForm"]
|
735
|
+
confirma_pre_venda_yes = cofirma_pre_venda.child_window(title="&Yes", class_name="TButton")
|
736
|
+
if confirma_pre_venda_yes.exists():
|
737
|
+
if confirma_pre_venda_yes.is_enabled():
|
738
|
+
confirma_pre_venda_yes.click()
|
739
|
+
else:
|
740
|
+
log_msg = f"Confirmação pré-venda da transferência nao encontrada"
|
741
|
+
return RpaRetornoProcessoDTO(
|
742
|
+
sucesso=False,
|
743
|
+
retorno=log_msg,
|
744
|
+
status=RpaHistoricoStatusEnum.Falha,
|
745
|
+
)
|
746
|
+
except Exception as e:
|
747
|
+
return RpaRetornoProcessoDTO(
|
748
|
+
sucesso=False,
|
749
|
+
retorno=f"Falha ao confirmar pre venda: {e}",
|
750
|
+
status=RpaHistoricoStatusEnum.Falha,
|
751
|
+
)
|
752
|
+
await worker_sleep(5)
|
753
|
+
try:
|
754
|
+
app = Application().connect(class_name="TMessageForm")
|
755
|
+
confirmada_pre_venda = app["TMessageForm"]
|
756
|
+
confirmada_pre_venda_ok = confirmada_pre_venda.child_window(title="OK", class_name="TButton")
|
757
|
+
if confirmada_pre_venda_ok.exists():
|
758
|
+
if confirmada_pre_venda_ok.is_enabled():
|
759
|
+
confirmada_pre_venda_ok.click()
|
760
|
+
else:
|
761
|
+
log_msg = f"Tela de pré-venda confirmada nao encontrada"
|
762
|
+
return RpaRetornoProcessoDTO(
|
763
|
+
sucesso=False,
|
764
|
+
retorno=log_msg,
|
765
|
+
status=RpaHistoricoStatusEnum.Falha,
|
766
|
+
)
|
767
|
+
except Exception as e:
|
768
|
+
log_msg = f"Tela de pré-venda confirmada nao encontrada"
|
769
|
+
return RpaRetornoProcessoDTO(
|
770
|
+
sucesso=False,
|
771
|
+
retorno=log_msg,
|
772
|
+
status=RpaHistoricoStatusEnum.Falha,
|
773
|
+
)
|
748
774
|
# screenshot_path = take_screenshot()
|
749
|
-
#
|
750
|
-
# screenshot_path, "
|
775
|
+
# message_confirma_transferencia = take_target_position(
|
776
|
+
# screenshot_path, "confirmar"
|
751
777
|
# )
|
752
|
-
# if
|
753
|
-
#
|
754
|
-
#
|
778
|
+
# if message_confirma_transferencia is not None:
|
779
|
+
# # clica em sim na mensagem
|
780
|
+
# button_yes = find_target_position(screenshot_path, "Yes", attempts=8)
|
781
|
+
# pyautogui.click(button_yes)
|
782
|
+
# console.log(
|
783
|
+
# "Cliclou em 'Sim' para cofirmar a pré-venda", style="bold green"
|
784
|
+
# )
|
785
|
+
# pyautogui.moveTo(1200, 300)
|
786
|
+
# await worker_sleep(5)
|
787
|
+
# screenshot_path = take_screenshot()
|
788
|
+
# vencimento_message_primeira_parcela = take_target_position(
|
789
|
+
# screenshot_path, "vencimento"
|
790
|
+
# )
|
791
|
+
# # Pode nao aparecer na prod
|
792
|
+
# if vencimento_message_primeira_parcela is not None:
|
793
|
+
# button_yes = find_target_position(screenshot_path, "Yes", attempts=15)
|
794
|
+
# pyautogui.click(button_yes)
|
795
|
+
# await worker_sleep(5)
|
796
|
+
# screenshot_path = take_screenshot()
|
797
|
+
# # Clica no OK 'Pre-Venda incluida com sucesso'
|
798
|
+
# button_ok = find_target_position(screenshot_path, "Ok", attempts=15)
|
799
|
+
# pyautogui.click(button_ok)
|
800
|
+
# console.log(
|
801
|
+
# "Cliclou em 'OK' para pré-venda confirmada com sucesso",
|
802
|
+
# style="bold green",
|
803
|
+
# )
|
755
804
|
# else:
|
756
|
-
#
|
757
|
-
#
|
758
|
-
#
|
759
|
-
#
|
760
|
-
#
|
761
|
-
# console.print(log_msg, style="bold yellow")
|
762
|
-
# # return RpaRetornoProcessoDTO(
|
763
|
-
# # sucesso=False,
|
764
|
-
# # retorno=log_msg,
|
765
|
-
# # status=RpaHistoricoStatusEnum.Falha)
|
766
|
-
|
767
|
-
pyautogui.moveTo(1200, 300)
|
768
|
-
|
769
|
-
console.print("Verificando a mensagem: Confirmar transferencia...\n")
|
770
|
-
screenshot_path = take_screenshot()
|
771
|
-
message_confirma_transferencia = take_target_position(
|
772
|
-
screenshot_path, "confirmar"
|
773
|
-
)
|
774
|
-
if message_confirma_transferencia is not None:
|
775
|
-
# clica em sim na mensagem
|
776
|
-
button_yes = find_target_position(screenshot_path, "Yes", attempts=8)
|
777
|
-
pyautogui.click(button_yes)
|
778
|
-
console.log(
|
779
|
-
"Cliclou em 'Sim' para cofirmar a pré-venda", style="bold green"
|
780
|
-
)
|
781
|
-
pyautogui.moveTo(1200, 300)
|
782
|
-
await worker_sleep(5)
|
783
|
-
screenshot_path = take_screenshot()
|
784
|
-
vencimento_message_primeira_parcela = take_target_position(
|
785
|
-
screenshot_path, "vencimento"
|
786
|
-
)
|
787
|
-
# Pode nao aparecer na prod
|
788
|
-
if vencimento_message_primeira_parcela is not None:
|
789
|
-
button_yes = find_target_position(screenshot_path, "Yes", attempts=15)
|
790
|
-
pyautogui.click(button_yes)
|
791
|
-
await worker_sleep(5)
|
792
|
-
screenshot_path = take_screenshot()
|
793
|
-
# Clica no OK 'Pre-Venda incluida com sucesso'
|
794
|
-
button_ok = find_target_position(screenshot_path, "Ok", attempts=15)
|
795
|
-
pyautogui.click(button_ok)
|
796
|
-
console.log(
|
797
|
-
"Cliclou em 'OK' para pré-venda confirmada com sucesso",
|
798
|
-
style="bold green",
|
799
|
-
)
|
800
|
-
else:
|
801
|
-
log_msg = (
|
802
|
-
f"Mensagem 'Deseja realmente confirmar esta pré-venda?' não encontrada."
|
803
|
-
)
|
804
|
-
console.print(log_msg, style="bold yellow")
|
805
|
-
await worker_sleep(2)
|
805
|
+
# log_msg = (
|
806
|
+
# f"Mensagem 'Deseja realmente confirmar esta pré-venda?' não encontrada."
|
807
|
+
# )
|
808
|
+
# console.print(log_msg, style="bold yellow")
|
809
|
+
# await worker_sleep(2)
|
806
810
|
|
807
|
-
# Clica em OK na mensagem de sucesso de confirmação da pré-venda
|
808
|
-
pre_venda_sucesso = (961, 550)
|
809
|
-
# pyautogui.confirm("click ok")
|
810
|
-
pyautogui.click(pre_venda_sucesso)
|
811
|
-
console.log('Clicou em "OK" na mensagem de sucesso', style="bold green")
|
811
|
+
# # Clica em OK na mensagem de sucesso de confirmação da pré-venda
|
812
|
+
# pre_venda_sucesso = (961, 550)
|
813
|
+
# # pyautogui.confirm("click ok")
|
814
|
+
# pyautogui.click(pre_venda_sucesso)
|
815
|
+
# console.log('Clicou em "OK" na mensagem de sucesso', style="bold green")
|
812
816
|
|
813
817
|
await worker_sleep(10)
|
814
818
|
|
@@ -55,7 +55,7 @@ worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py,sha256=QBGm6eS5J
|
|
55
55
|
worker_automate_hub/tasks/jobs/login_emsys.py,sha256=IoGCIvO4UwmuxOZEn3cvYJlKyhsWvtHvbFk8vwjTroQ,5620
|
56
56
|
worker_automate_hub/tasks/jobs/playground.py,sha256=bdnXv3C7WLQUxt4edGZDfAbRJJ2-q4zuIQaK3GLnaUc,1765
|
57
57
|
worker_automate_hub/tasks/jobs/sped_fiscal.py,sha256=_byvD7i_N3pgPjQd1lc0XNKCFONIPbmvX3_jq5AnbKY,26707
|
58
|
-
worker_automate_hub/tasks/jobs/transferencias.py,sha256=
|
58
|
+
worker_automate_hub/tasks/jobs/transferencias.py,sha256=zwCbVTwX15SCeLtvYgAyENeUSIuETx4Z9Cysr1Es8Jo,38013
|
59
59
|
worker_automate_hub/tasks/task_definitions.py,sha256=2Jp1H4_qJZqqGyaP6MA87KLt4QNrtWBYWbXu-2gymFo,4459
|
60
60
|
worker_automate_hub/tasks/task_executor.py,sha256=eXFgWbcM8aMPwENvNix8KyFv7BqvIwhXUDkBSI1ul7M,8873
|
61
61
|
worker_automate_hub/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -67,7 +67,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
|
|
67
67
|
worker_automate_hub/utils/util.py,sha256=YQkdPMCgrwuCJG_069p1cIG7xTg8VgvSHlGnIQrlyHo,119625
|
68
68
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=yQFyDzvXPSO-UYV1m38WLJ3AWQgZYcyUkHZdCKE1jG4,28360
|
69
69
|
worker_automate_hub/worker.py,sha256=KDBU3L2kVobndrnN5coRZFTwVmBLKmPJjRv20sCo5Hc,4697
|
70
|
-
worker_automate_hub-0.4.
|
71
|
-
worker_automate_hub-0.4.
|
72
|
-
worker_automate_hub-0.4.
|
73
|
-
worker_automate_hub-0.4.
|
70
|
+
worker_automate_hub-0.4.410.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
71
|
+
worker_automate_hub-0.4.410.dist-info/METADATA,sha256=e_kP37SqB4endIYofvv33L1P-J-fZeanJjbGmGAqF9I,2895
|
72
|
+
worker_automate_hub-0.4.410.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
73
|
+
worker_automate_hub-0.4.410.dist-info/RECORD,,
|
File without changes
|
{worker_automate_hub-0.4.409.dist-info → worker_automate_hub-0.4.410.dist-info}/entry_points.txt
RENAMED
File without changes
|