worker-automate-hub 0.4.437__py3-none-any.whl → 0.4.439__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -89,6 +89,7 @@ class RDPConnection:
89
89
  pyautogui.hotkey("enter")
90
90
  await worker_sleep(5)
91
91
  pyautogui.hotkey("enter")
92
+ break
92
93
 
93
94
  except Exception as e:
94
95
  console.print(f"Erro ao interagir com a janela {titulo}: {e}")
@@ -248,6 +248,14 @@ async def find_element_center(image_path, region_to_look, timeout):
248
248
 
249
249
  def type_text_into_field(text, field, empty_before, chars_to_empty):
250
250
  try:
251
+ try:
252
+ app = Application().connect(class_name="TFrmMenuPrincipal", timeout=60)
253
+ main_window = app["TFrmMenuPrincipal"]
254
+
255
+ main_window.set_focus()
256
+ except:
257
+ console.print(f"Erro ao conectar na janela, tentando seguir..")
258
+
251
259
  if empty_before:
252
260
  field.type_keys("{BACKSPACE " + chars_to_empty + "}", with_spaces=True)
253
261
 
@@ -2176,7 +2184,7 @@ async def select_documento_type(document_type: str) -> RpaRetornoProcessoDTO:
2176
2184
  RpaRetornoProcessoDTO: Retorna um objeto com informações sobre o status do processo.
2177
2185
  """
2178
2186
  try:
2179
- app = Application().connect(class_name="TFrmNotaFiscalEntrada")
2187
+ app = Application().connect(class_name="TFrmNotaFiscalEntrada", timeout=60)
2180
2188
  main_window = app["TFrmNotaFiscalEntrada"]
2181
2189
 
2182
2190
  main_window.set_focus()
@@ -2374,11 +2382,18 @@ async def error_after_xml_imported() -> RpaRetornoProcessoDTO:
2374
2382
  capturar_proxima_mensagem = True
2375
2383
 
2376
2384
  elif capturar_proxima_mensagem:
2377
- return RpaRetornoProcessoDTO(
2385
+ if "duplicate key" in control_text:
2386
+ return RpaRetornoProcessoDTO(
2378
2387
  sucesso=False,
2379
- retorno=f"Erro do banco de dados: {control_text} \n",
2388
+ retorno=f"Não foi possivel seguir devido ao numero da chave ja existir no banco de dados, erro: {control_text}... \n",
2380
2389
  status=RpaHistoricoStatusEnum.Falha,
2381
2390
  )
2391
+ else:
2392
+ return RpaRetornoProcessoDTO(
2393
+ sucesso=False,
2394
+ retorno=f"Erro do banco de dados: {control_text} \n",
2395
+ status=RpaHistoricoStatusEnum.Falha,
2396
+ )
2382
2397
 
2383
2398
  elif "XML já foi importado anteriormente" in control_text:
2384
2399
  return RpaRetornoProcessoDTO(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: worker-automate-hub
3
- Version: 0.4.437
3
+ Version: 0.4.439
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
@@ -30,7 +30,7 @@ worker_automate_hub/models/dto/rpa_sistema_dto.py,sha256=sLkmJei8x6sl-1-IXUKDmYQ
30
30
  worker_automate_hub/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  worker_automate_hub/tasks/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  worker_automate_hub/tasks/jobs/coleta_dje_process.py,sha256=rf4fW-FaHUl1MS7b03z4cwI3zHfNw8FWxvjvNY3Xn20,28773
33
- worker_automate_hub/tasks/jobs/conexao_rdp.py,sha256=eT7lHeU-7-aajIGST8qEZfuFbIdNM58bOiWrMozFMVM,9270
33
+ worker_automate_hub/tasks/jobs/conexao_rdp.py,sha256=4eEf3Hsm9TCGESn5cK-uSpHwbCYeCOBG44Q4cBYwmvc,9293
34
34
  worker_automate_hub/tasks/jobs/descartes.py,sha256=RIjrZIzkW77NiKeXbxFN9k872cz3fl9cG1m5TJpjmmY,40134
35
35
  worker_automate_hub/tasks/jobs/ecac_estadual_go.py,sha256=aPckQRlRozFS_OK3C9wNdMCmqO6AM4djwqY2uSSaPmo,20687
36
36
  worker_automate_hub/tasks/jobs/ecac_estadual_main.py,sha256=FFpAdtZLO4uelWZooCVpm4JePv_iDt5nwVKrk1ipZJQ,1599
@@ -65,10 +65,10 @@ worker_automate_hub/utils/get_creds_gworkspace.py,sha256=ZJ0IIEjM4IXIV9rwfbOZ1V1
65
65
  worker_automate_hub/utils/logger.py,sha256=FYV9fg0_RAYJF_ZOCJEbqQAiCXlXk2gMpvUU1rzT_xs,671
66
66
  worker_automate_hub/utils/toast.py,sha256=xPHc5r5uOxB_cZlCzm13Kt2qSKLLFZALncU6Qg3Ft68,1162
67
67
  worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbVlwDl49Y,7972
68
- worker_automate_hub/utils/util.py,sha256=nR3tADb5Rpfn8L1kScLhszEPGKjW3dQMdvIvriIA3tY,121109
68
+ worker_automate_hub/utils/util.py,sha256=VwvoSG2dNaukxzFNANMU3LtqPoKvTv-x_dUJJGbpQqs,121792
69
69
  worker_automate_hub/utils/utils_nfe_entrada.py,sha256=7ju688sD52y30taGSm5rPMGdQyByUUwveLeKV4ImEiE,28401
70
70
  worker_automate_hub/worker.py,sha256=KDBU3L2kVobndrnN5coRZFTwVmBLKmPJjRv20sCo5Hc,4697
71
- worker_automate_hub-0.4.437.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
72
- worker_automate_hub-0.4.437.dist-info/METADATA,sha256=Bf4i35OEMjO7sxwRUNiwe3k7sBCSYwXTBjIJug-PkJ0,2895
73
- worker_automate_hub-0.4.437.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
74
- worker_automate_hub-0.4.437.dist-info/RECORD,,
71
+ worker_automate_hub-0.4.439.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
72
+ worker_automate_hub-0.4.439.dist-info/METADATA,sha256=1DPsMflrWAemziZFs6VL-WsuIvSMXFyQn3PuQicKWq4,2895
73
+ worker_automate_hub-0.4.439.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
74
+ worker_automate_hub-0.4.439.dist-info/RECORD,,