worker-automate-hub 0.5.330__py3-none-any.whl → 0.5.331__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.
@@ -3315,7 +3315,7 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
3315
3315
  tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)]
3316
3316
  )
3317
3317
 
3318
-
3318
+
3319
3319
  #VERIFICANDO SE POSSUI POP UP WARNING
3320
3320
  console.print("Verificando a presença de Warning... \n")
3321
3321
  warning_boo = False
@@ -3604,57 +3604,43 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
3604
3604
  else:
3605
3605
  console.print("Não possui warning para alterar tributação... \n")
3606
3606
 
3607
- try:
3608
- #Clcica no OK para seguir a transmissão da pré-venda
3609
- console.print("Clicando em ok para fatura pré-venda... \n")
3610
- app = Application().connect(class_name="TFrmDadosFaturamentoPreVenda", timeout=60)
3611
- main_window = app["TFrmDadosFaturamentoPreVenda"]
3612
- main_window.set_focus()
3613
- btn_ok = main_window.child_window(class_name="TBitBtn", found_index=1)
3614
- btn_ok.click()
3615
- except:
3616
- console.print("Clicando em OK no except... \n")
3617
- btn_ok = main_window.child_window(title="&Ok")
3618
- btn_ok.click()
3607
+ # try:
3608
+ # #Clcica no OK para seguir a transmissão da pré-venda
3609
+ # app = Application().connect(class_name="TFrmDadosFaturamentoPreVenda", timeout=60)
3610
+ # main_window = app["TFrmDadosFaturamentoPreVenda"]
3611
+ # main_window.set_focus()
3612
+ # btn_ok = main_window.child_window(class_name="TBitBtn", found_index=1)
3613
+ # btn_ok.click()
3614
+ # except:
3615
+ # btn_ok = main_window.child_window(title="&Ok")
3616
+ # btn_ok.click()
3617
+ # await worker_sleep(5)
3619
3618
 
3620
- await worker_sleep(5)
3621
-
3622
- try:
3623
- console.print("Clicando em sim para faturar pre-venda... \n")
3624
- app = Application().connect(class_name="TMessageForm", timeout=10, title="Confirm")
3625
- main_window = app["TMessageForm"]
3626
- main_window.set_focus()
3627
- main_window.chiwld_window(title="&Yes").click()
3628
- except:
3629
- ...
3630
-
3631
- #Lucas Fim
3632
- #ADICIONANDO MENSAGEM
3633
-
3619
+ #Lucas Fim
3620
+ #ADICIONANDO MENSAGEM
3621
+ await worker_sleep(5)
3634
3622
  try:
3635
- console.print("Identificando tela - 'TFrmDadosFaturamentoPreVenda' 1 ")
3623
+ console.print("Identificando - TFrmDadosFaturamentoPreVenda 1")
3636
3624
  app = Application().connect(class_name="TFrmDadosFaturamentoPreVenda", timeout=10)
3637
3625
  main_window = app["Confirm"]
3638
3626
  main_window.set_focus()
3639
3627
  except:
3640
- console.print("Identificando tela - 'TMessageForm' 1 ")
3641
- app = Application().connect(class_name="TMessageForm", timeout=10)
3628
+ console.print("Identificando - TMessageForm 1")
3629
+ app = Application().connect(class_name="TMessageForm", timeout=10, title='Confirm')
3642
3630
  main_window = app["TMessageForm"]
3643
3631
  main_window.set_focus()
3644
-
3645
- console.print("Clicando em sim para faturar pre-venda... \n")
3646
- btn_yes = main_window.child_window(class_name="TButton", found_index=1)
3632
+
3633
+ btn_yes = main_window.child_window(class_name="TButton", title="&Yes")
3647
3634
  btn_yes.click()
3648
3635
 
3649
3636
  await worker_sleep(5)
3650
3637
 
3651
3638
  try:
3652
- console.print("Identificando tela - 'TFrmDadosFaturamentoPreVenda' 2 ")
3639
+ console.print('Identificando - TFrmDadosFaturamentoPreVenda 2')
3653
3640
  app = Application().connect(class_name="TFrmDadosFaturamentoPreVenda", timeout=10)
3654
3641
  main_window = app["TMessageForm"]
3655
3642
  except Exception as ex:
3656
- console.print(f'{ex}')
3657
- console.print("Identificando tela - 'TMessageForm' 2 ")
3643
+ console.print(f'{ex} - TMessageForm 2')
3658
3644
  app = Application().connect(class_name="TMessageForm", timeout=10)
3659
3645
  main_window = app["TMessageForm"]
3660
3646
 
@@ -3824,33 +3810,113 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
3824
3810
  )
3825
3811
  except:
3826
3812
  console.print("Janela TFrmProcessamentoNFe2 ja fechada")
3813
+
3827
3814
 
3828
- try:
3829
- await worker_sleep(10)
3830
- app = Application().connect(class_name="TFrmGerenciadorNFe2", timeout=10)
3831
- window_gerenciador = app["TFrmGerenciadorNFe2"]
3832
- window_gerenciador.set_focus()
3833
- window_gerenciador.close()
3834
- except:
3835
- console.print("Janela TFrmGerenciadorNFe2 ja fechada")
3815
+ console.print("Verificando se possui pop-up imprimir boleta")
3816
+ boleta_screen = await is_window_open("Confirm")
3817
+ if boleta_screen["IsOpened"] == True:
3818
+ console.print("Janela aberta, fechando")
3819
+ try:
3820
+ console.print("Confirm")
3821
+ app = Application().connect(title="Confirm", timeout=10)
3822
+ main_window = app["Confirm"]
3823
+ main_window.set_focus()
3824
+ except:
3825
+ console.print("Identificando - TMessageForm 1")
3826
+ app = Application().connect(class_name="TMessageForm", timeout=10, title='Confirm')
3827
+ main_window = app["TMessageForm"]
3828
+ main_window.set_focus()
3829
+
3830
+ btn_no = main_window.child_window(class_name="TButton", title="&No")
3831
+ btn_no.click()
3832
+
3833
+
3834
+ await worker_sleep(7)
3835
+ erro_screen = await is_window_open_by_class("TFrmDadosFaturamentoPreVenda","Confirm")
3836
+ if erro_screen["IsOpened"] == True:
3837
+ console.print("Janela aberta, fechando")
3838
+ try:
3839
+ console.print("Identificando - TFrmDadosFaturamentoPreVenda 1")
3840
+ app = Application().connect(class_name="TFrmDadosFaturamentoPreVenda", timeout=10)
3841
+ main_window = app["Confirm"]
3842
+ main_window.set_focus()
3843
+ except:
3844
+ console.print("Identificando - TMessageForm 1")
3845
+ app = Application().connect(class_name="TMessageForm", timeout=10, title='Confirm')
3846
+ main_window = app["TMessageForm"]
3847
+ main_window.set_focus()
3836
3848
 
3849
+ btn_no = main_window.child_window(class_name="TButton", title="&No")
3850
+ btn_no.click()
3851
+
3837
3852
 
3853
+ await worker_sleep(10)
3854
+ console.print("Verificando se a tela de Mensagem esta aberta")
3838
3855
  erro_screen = await is_window_open_by_class("TMemo","TMemo")
3839
3856
  if erro_screen["IsOpened"] == True:
3857
+ console.print("Janela aberta, fechando")
3840
3858
  app = Application().connect(class_name="TMemo", timeout=10)
3841
3859
  main_window = app["TMemo"]
3842
3860
  main_window.set_focus()
3843
- await worker_sleep(2)
3861
+ await worker_sleep(5)
3844
3862
  main_window.close()
3863
+
3845
3864
 
3865
+ console.print("Verificando se a tela de Faturamento Pre venda esta aberta")
3866
+ close_dados_faturamento = await is_window_open_by_class("TFrmDadosFaturamentoPreVenda","TFrmDadosFaturamentoPreVenda")
3867
+ if close_dados_faturamento["IsOpened"] == True:
3868
+ console.print("Janela aberta, fechando")
3869
+ try:
3870
+ app = Application().connect(class_name="TFrmDadosFaturamentoPreVenda", timeout=60)
3871
+ main_window = app["TFrmDadosFaturamentoPreVenda"]
3872
+ main_window.set_focus()
3873
+ btn_cancelar = main_window.child_window(class_name="TBitBtn", found_index=0)
3874
+ btn_cancelar.click()
3875
+ except:
3876
+ btn_cancelar = main_window.child_window(title="&Cancela")
3877
+ btn_cancelar.click()
3846
3878
 
3879
+
3880
+ await worker_sleep(10)
3881
+ console.print("Verificando se a tela de Faturamento Pre venda esta aberta")
3847
3882
  close_dados_faturamento = await is_window_open_by_class("TFrmDadosFaturamentoPreVenda","TFrmDadosFaturamentoPreVenda")
3848
3883
  if close_dados_faturamento["IsOpened"] == True:
3849
- app = Application().connect(class_name="TFrmDadosFaturamentoPreVenda", timeout=10)
3850
- main_window = app["TFrmDadosFaturamentoPreVenda"]
3851
- main_window.set_focus()
3884
+ console.print("Janela aberta, fechando")
3885
+ try:
3886
+ app = Application().connect(class_name="TFrmDadosFaturamentoPreVenda", timeout=180)
3887
+ main_window = app["TFrmDadosFaturamentoPreVenda"]
3888
+ main_window.set_focus()
3889
+ await worker_sleep(2)
3890
+ main_window.close()
3891
+ except Exception as e:
3892
+ console.print(f"Erro ao fechar a janela de dados faturamento pre venda {e}")
3893
+
3894
+
3895
+ await worker_sleep(5)
3896
+ console.print("Verificando se a tela de Gerenciador esta aberta")
3897
+ window_gerenciador_screen = await is_window_open_by_class("TFrmGerenciadorNFe2","TFrmGerenciadorNFe2")
3898
+ if window_gerenciador_screen["IsOpened"] == True:
3899
+ app = Application().connect(class_name="TFrmGerenciadorNFe2", timeout=10)
3900
+ window_gerenciador = app["TFrmGerenciadorNFe2"]
3901
+ window_gerenciador.set_focus()
3852
3902
  await worker_sleep(2)
3853
- main_window.close()
3903
+ window_gerenciador.close()
3904
+ else:
3905
+ console.print("Janela TFrmGerenciadorNFe2 ja fechada")
3906
+
3907
+
3908
+ await worker_sleep(10)
3909
+ console.print("Verificando se a tela de Pre venda esta aberta")
3910
+ window_gerenciador_screen = await is_window_open_by_class("TFrmPreVenda","TFrmPreVenda")
3911
+ if window_gerenciador_screen["IsOpened"] == True:
3912
+ app = Application().connect(class_name="TFrmPreVenda", timeout=10)
3913
+ window_gerenciador = app["TFrmPreVenda"]
3914
+ window_gerenciador.set_focus()
3915
+ await worker_sleep(2)
3916
+ window_gerenciador.close()
3917
+ else:
3918
+ console.print("Janela TFrmPreVenda ja fechada")
3919
+
3854
3920
 
3855
3921
  except Exception as e:
3856
3922
  retorno = f"Não foi possivel concluir o processo de pré venda {e} \nEtapas Executadas:\n{steps}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.330
3
+ Version: 0.5.331
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
@@ -42,7 +42,7 @@ worker_automate_hub/tasks/jobs/cte_manual.py,sha256=JucHpRMjMiy-QEJ0wtFnytLpN53t
42
42
  worker_automate_hub/tasks/jobs/descartes.py,sha256=2zODOekSJSr7nuO9sUzT_F3YeG7N5EHuxnp05RguirE,41361
43
43
  worker_automate_hub/tasks/jobs/despesas_cte.py,sha256=TWbjBMZjYDugiqYUa_1DtCAUWOyVetoZI2SPs7AdDNc,13264
44
44
  worker_automate_hub/tasks/jobs/devolucao_ctf.py,sha256=A41O9a6kVUweUBy7Lc2dpJoeAi8QYxu-pMc8u-g0yTg,110241
45
- worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py,sha256=-2wnqWOwIuwO41VQnlnQjM_9pU8h4w1HaceIP3yfXdo,239654
45
+ worker_automate_hub/tasks/jobs/devolucao_prazo_a_faturar.py,sha256=l75ybIiVb9VIo6dhiEoszFOaJIJq7dUbkGLNtqGDHXw,243961
46
46
  worker_automate_hub/tasks/jobs/ecac_estadual_go.py,sha256=dKkf22nH5gp3RErq5u0UzRsKyJ81fc6ZZ4vLtUuMwHA,21002
47
47
  worker_automate_hub/tasks/jobs/ecac_estadual_main.py,sha256=8WmKe4-MRtzHobXz2S4YBDNN8alfawkC-BBlRY-mn1g,1726
48
48
  worker_automate_hub/tasks/jobs/ecac_estadual_mt.py,sha256=C26zmpGQGUq6sP9lU9nanM3Fje-rkyx5tjwmRy4lyL8,25300
@@ -85,7 +85,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
85
85
  worker_automate_hub/utils/util.py,sha256=sadsyNEdhkhMHU2jVdDCJK59kHd4TWVDmmfQ62gc5Q8,182626
86
86
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=wmnpuOesmPSryZszmapa37b9YNC0E2MkeDYnbwr-0rU,33315
87
87
  worker_automate_hub/worker.py,sha256=axdrr1xLTjWEyWfcyH3OCSpPTsyzck_fL_0u1DBLjvw,6525
88
- worker_automate_hub-0.5.330.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
89
- worker_automate_hub-0.5.330.dist-info/METADATA,sha256=CmptUF4ds7-4M1zq2lf1126Rt99DBYF5lA22vNS4Q9U,3041
90
- worker_automate_hub-0.5.330.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
91
- worker_automate_hub-0.5.330.dist-info/RECORD,,
88
+ worker_automate_hub-0.5.331.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
89
+ worker_automate_hub-0.5.331.dist-info/METADATA,sha256=160zZC56WQlRv-qL1CES4poUbcwE3Pw2O2LikJ_T4NQ,3041
90
+ worker_automate_hub-0.5.331.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
91
+ worker_automate_hub-0.5.331.dist-info/RECORD,,