worker-automate-hub 0.5.759__py3-none-any.whl → 0.5.760__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.
@@ -340,28 +340,51 @@ async def extracao_saldo_estoque_fiscal(
340
340
  print("✅ Texto inserido no campo Nome")
341
341
 
342
342
  await worker_sleep(3)
343
+
344
+ # Clicar em Salvar
345
+ main_window.child_window(class_name="TBitBtn", found_index=1).click_input()
346
+
347
+ await worker_sleep(5)
348
+
349
+ # Conecta na janela "Salvar para arquivo"
350
+ app = Application().connect(title_re="Salvar para arquivo", timeout=30)
351
+ main_window = app.window(title_re="Salvar para arquivo")
352
+
353
+ # Campo Nome (Edit) - use set_edit_text para evitar problemas de escape
354
+ campo_nome = main_window.child_window(
355
+ class_name="Edit", control_id=1148
356
+ ).wrapper_object()
357
+ caminho_arquivo = f"C:\\Users\\automatehub\\Downloads\\saldo_estoque_fiscal_{periodo_format}_{filial}.xlsx"
358
+ campo_nome.set_focus()
359
+ campo_nome.set_edit_text(caminho_arquivo)
360
+
361
+ print("✅ Texto inserido no campo Nome")
362
+
363
+ await worker_sleep(2)
343
364
 
344
365
  # Clicar em ok para salvar
345
- keyboard.send_keys("{TAB}{TAB}{ENTER}", pause=0.3)
366
+ main_window.child_window(class_name="Button", found_index=0).click_input()
346
367
 
347
- await worker_sleep(5)
368
+ await worker_sleep(20)
348
369
 
349
- caminho_img = r"assets\\extracao_realtorios\\janela_printing.png"
370
+ # caminho_img = r"assets\\extracao_relatorios\\janela_printing.png"
350
371
 
351
372
  # Aguarda até a janela com título "Printing" (ou "Salvando...") fechar
373
+
352
374
  try:
353
375
  app = Application().connect(title_re="Printing") # conecta se existir
354
376
  janela = app.window(title_re="Printing")
355
377
 
356
- print("Aguardando a janela 'Printing' sumir...")
378
+ print("Aguardando a janela 'Printing' sumir...")
357
379
  janela.wait_not("visible", timeout=60) # espera até 60 segundos
358
- print("Janela 'Printing' fechada.")
380
+ print("Janela 'Printing' fechada.")
359
381
 
360
382
  except findwindows.ElementNotFoundError:
361
- print("Janela 'Printing' não estava aberta.")
383
+ print("⚠️ Janela 'Printing' não estava aberta.")
362
384
 
363
385
  nome_com_extensao = f"saldo_estoque_fiscal_{periodo_format}_{filial}.xlsx"
364
386
  # lê o arquivo
387
+ print(caminho_arquivo)
365
388
  with open(f"{caminho_arquivo}", "rb") as file:
366
389
  file_bytes = io.BytesIO(file.read())
367
390
 
@@ -378,7 +401,7 @@ async def extracao_saldo_estoque_fiscal(
378
401
  os.remove(f"{caminho_arquivo}")
379
402
  return RpaRetornoProcessoDTO(
380
403
  sucesso=True,
381
- retorno="Relatório enviado com sucesso",
404
+ retorno="Relatório gerado com sucesso",
382
405
  status=RpaHistoricoStatusEnum.Sucesso,
383
406
  )
384
407
 
@@ -391,8 +414,6 @@ async def extracao_saldo_estoque_fiscal(
391
414
  tags=[RpaTagDTO(descricao=RpaTagEnum.Tecnico)],
392
415
  )
393
416
 
394
- print("")
395
-
396
417
  except Exception as ex:
397
418
  retorno = f"Erro Processo Saldo Estoque Fiscal: {str(ex)}"
398
419
  logger.error(retorno)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: worker-automate-hub
3
- Version: 0.5.759
3
+ Version: 0.5.760
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
@@ -71,7 +71,7 @@ worker_automate_hub/tasks/jobs/exemplo_processo.py,sha256=nV0iLoip2FH2-FhLmhX3nP
71
71
  worker_automate_hub/tasks/jobs/extracao_fechamento_contabil.py,sha256=6Kr5DKjKLqtFvGzyiXtt7xrQsuU898l8pQXDq9C6AX8,19567
72
72
  worker_automate_hub/tasks/jobs/extracao_fechamento_emsys.py,sha256=-T2nZUDiFrUGm_KLxJd_4qcrageDxVpWW3KAAniLFC4,21448
73
73
  worker_automate_hub/tasks/jobs/extracao_saldo_estoque.py,sha256=nFAv5Bvwwo2Mhy69q5BqR-XsKtg4KIqAunrUmGeW1S0,9173
74
- worker_automate_hub/tasks/jobs/extracao_saldo_estoque_fiscal.py,sha256=OJQAkE6mqm7lNodleYRWwJq3syxrTqcPGt27_u6NPPs,14950
74
+ worker_automate_hub/tasks/jobs/extracao_saldo_estoque_fiscal.py,sha256=LheMUIU7F8pAw8KVxTmQhhlDQ7kW42QSitBRFO9j5nc,15852
75
75
  worker_automate_hub/tasks/jobs/fechar_conexao_rdp.py,sha256=UWAKCS2dbfgDlSQOBdjmVJXfD1MMuUrOi3weDgB0CAc,5718
76
76
  worker_automate_hub/tasks/jobs/fidc_exportacao_docs_portal_b2b.py,sha256=tWUmYy3Zhi3JEt8AoqTsWpU-wbf5-OxhCrTOooh1WH4,15616
77
77
  worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py,sha256=FAmcCqKVjedf7wIped8XRLIZ9S3oWc6fakF-r1Zm0kg,12637
@@ -101,7 +101,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
101
101
  worker_automate_hub/utils/util.py,sha256=V2WtWoETdTrAtGA8UgeqAAVphUj9KkGSZFzYsHJFATA,210055
102
102
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=TOXKSHOPxy8N3-ROpTGjNIHstX0i2b8qekcj1tRvjG8,38174
103
103
  worker_automate_hub/worker.py,sha256=uhZ3f-iaQ1i8cANbljp50vkYl-Xm0_sHtjwwF_2y72o,7191
104
- worker_automate_hub-0.5.759.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
105
- worker_automate_hub-0.5.759.dist-info/METADATA,sha256=tMWbnY_CoFvxTSMsKPGVRbkAsl_HM5XxtbKuLCk0Ajw,3049
106
- worker_automate_hub-0.5.759.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
107
- worker_automate_hub-0.5.759.dist-info/RECORD,,
104
+ worker_automate_hub-0.5.760.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
105
+ worker_automate_hub-0.5.760.dist-info/METADATA,sha256=Sq_wBqMzzZ0x5JuDsv7Cw82mJo3kdlXuU0p9JJpvYaw,3049
106
+ worker_automate_hub-0.5.760.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
107
+ worker_automate_hub-0.5.760.dist-info/RECORD,,