worker-automate-hub 0.5.321__py3-none-any.whl → 0.5.323__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.
@@ -2435,16 +2435,20 @@ async def devolucao_prazo_a_faturar(task: RpaProcessoEntradaDTO) -> RpaRetornoPr
2435
2435
  await worker_sleep(2)
2436
2436
  main_window.close()
2437
2437
 
2438
-
2438
+
2439
+ await worker_sleep(5)
2439
2440
  console.print("Verificando se a tela de Faturamento Pre venda esta aberta")
2440
2441
  close_dados_faturamento = await is_window_open_by_class("TFrmDadosFaturamentoPreVenda","TFrmDadosFaturamentoPreVenda")
2441
2442
  if close_dados_faturamento["IsOpened"] == True:
2442
2443
  console.print("Janela aberta, fechando")
2443
- app = Application().connect(class_name="TFrmDadosFaturamentoPreVenda", timeout=10)
2444
- main_window = app["TFrmDadosFaturamentoPreVenda"]
2445
- main_window.set_focus()
2446
- await worker_sleep(2)
2447
- main_window.close()
2444
+ try:
2445
+ app = Application().connect(class_name="TFrmDadosFaturamentoPreVenda", timeout=30)
2446
+ main_window = app["TFrmDadosFaturamentoPreVenda"]
2447
+ main_window.set_focus()
2448
+ await worker_sleep(2)
2449
+ main_window.close()
2450
+ except Exception as e:
2451
+ console.print(f"Erro ao fechar a janela de pre venda {e}")
2448
2452
 
2449
2453
 
2450
2454
  except Exception as e: