worker-automate-hub 0.4.402__tar.gz → 0.4.404__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/PKG-INFO +1 -1
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/pyproject.toml +1 -1
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +105 -9
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/transferencias.py +60 -18
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/README.md +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/api/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/api/ahead_service.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/api/client.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/api/helpers/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/api/helpers/api_helpers.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/api/rpa_historico_service.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/cli.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/config/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/config/settings.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/config.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/core/so_manipulation.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/decorators/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/decorators/deprecation.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/decorators/rate_limit.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/decorators/repeat.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/decorators/retry.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/decorators/singleton.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/decorators/timeit.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/models/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/models/dao/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/models/dao/rpa_configuracao.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/models/dao/rpa_historico.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/models/dao/rpa_processo.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/models/dto/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/models/dto/rpa_historico_request_dto.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/models/dto/rpa_processo_entrada_dto.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/models/dto/rpa_sistema_dto.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/coleta_dje_process.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/conexao_rdp.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/descartes.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/ecac_estadual_go.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/ecac_estadual_main.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/ecac_estadual_mt.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/ecac_estadual_sc.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/ecac_estadual_sp.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/ecac_federal.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_15.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_16.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_207.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_32.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_33.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_34.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_36.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_500.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_505.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/exemplo_processo.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/login_emsys.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/playground.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/jobs/sped_fiscal.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/task_definitions.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/task_executor.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/__init__.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/env.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/get_creds_gworkspace.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/logger.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/toast.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/updater.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/util.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/utils_nfe_entrada.py +0 -0
- {worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/worker.py +0 -0
@@ -1,9 +1,11 @@
|
|
1
1
|
import asyncio
|
2
|
+
import datetime
|
2
3
|
import getpass
|
3
4
|
import os
|
4
5
|
import warnings
|
5
6
|
|
6
7
|
import pyautogui
|
8
|
+
import pyperclip
|
7
9
|
from pywinauto.keyboard import send_keys
|
8
10
|
from PIL import Image, ImageEnhance
|
9
11
|
import pytesseract
|
@@ -135,19 +137,23 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
135
137
|
class_name="TDBIComboBox", found_index=1
|
136
138
|
)
|
137
139
|
|
140
|
+
combo_box_tipo_documento.set_focus()
|
138
141
|
combo_box_tipo_documento.click()
|
142
|
+
|
139
143
|
console.print(
|
140
144
|
"Clique select box, Tipo de documento realizado com sucesso, selecionando o tipo de documento...\n"
|
141
145
|
)
|
142
146
|
|
143
147
|
await worker_sleep(4)
|
144
148
|
|
145
|
-
|
149
|
+
pyautogui.write("NFe - NOTA FISCAL ELETRONICA PROPRIA - DANFE SERIE 077")
|
146
150
|
console.print(
|
147
151
|
"Tipo de documento 'NFe - NOTA FISCAL ELETRONICA PROPRIA - DANFE SERIE 077', selecionado com sucesso...\n"
|
148
152
|
)
|
149
153
|
|
150
|
-
|
154
|
+
pyautogui.hotkey("enter")
|
155
|
+
|
156
|
+
await worker_sleep(10)
|
151
157
|
|
152
158
|
# Clica em 'Importar-Nfe'
|
153
159
|
imported_nfe = await import_nfe()
|
@@ -169,7 +175,7 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
169
175
|
await worker_sleep(3)
|
170
176
|
|
171
177
|
try:
|
172
|
-
|
178
|
+
|
173
179
|
#INTERAGINDO COM A TELA DE NOTAS DE OUTRAS EMPRESAS
|
174
180
|
app = Application().connect(class_name="TFrmImportarNotaOutraEmpresa")
|
175
181
|
main_window = app["TFrmImportarNotaOutraEmpresa"]
|
@@ -401,8 +407,48 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
401
407
|
retorno=f"Erro ao importar nota fiscal.",
|
402
408
|
status=RpaHistoricoStatusEnum.Descartado,
|
403
409
|
)
|
404
|
-
|
410
|
+
|
405
411
|
await worker_sleep(40)
|
412
|
+
|
413
|
+
try:
|
414
|
+
app = Application().connect(title="Confirm")
|
415
|
+
except:
|
416
|
+
app = None
|
417
|
+
console.print("Tela de itens não localizados",style="bold yellow")
|
418
|
+
if app is not None:
|
419
|
+
try:
|
420
|
+
window_itens = app["Confirm"]
|
421
|
+
button_yes = window_itens.child_window(title="&Yes")
|
422
|
+
#Clicar em YES (ou sim)
|
423
|
+
button_yes.click()
|
424
|
+
#Aguarda Tela carregar
|
425
|
+
await worker_sleep(5)
|
426
|
+
#Conecta com tela de itens
|
427
|
+
app = Application().connect(title="Incluir Item Fornecedor")
|
428
|
+
window_incluir_itens = app["Incluir Item Fornecedor"]
|
429
|
+
#Garante que a tela esta em foco
|
430
|
+
window_incluir_itens.set_focus()
|
431
|
+
trys = 10
|
432
|
+
await worker_sleep(1)
|
433
|
+
error_itens = []
|
434
|
+
for i in range(trys):
|
435
|
+
pyautogui.hotkey('ctrl', 'c')
|
436
|
+
text_incluir_item_fornecedor = pyperclip.paste()
|
437
|
+
error_itens.append(text_incluir_item_fornecedor)
|
438
|
+
pyautogui.press('down', presses=1)
|
439
|
+
await worker_sleep(1)
|
440
|
+
|
441
|
+
return RpaRetornoProcessoDTO(
|
442
|
+
sucesso=False,
|
443
|
+
retorno=f"Itens nao localizados - \n{text_incluir_item_fornecedor}",
|
444
|
+
status=RpaHistoricoStatusEnum.Falha,
|
445
|
+
)
|
446
|
+
except Exception as e:
|
447
|
+
return RpaRetornoProcessoDTO(
|
448
|
+
sucesso=False,
|
449
|
+
retorno=f"Erro tratar tela 'Incluir item fornecedor', erro: {e}",
|
450
|
+
status=RpaHistoricoStatusEnum.Falha,
|
451
|
+
)
|
406
452
|
|
407
453
|
await emsys.verify_warning_and_error("Information", "&No")
|
408
454
|
|
@@ -428,9 +474,8 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
428
474
|
pyautogui.write(nota["valorNota"])
|
429
475
|
|
430
476
|
await emsys.incluir_registro()
|
431
|
-
await worker_sleep(
|
432
|
-
|
433
|
-
await worker_sleep(5)
|
477
|
+
await worker_sleep(40)
|
478
|
+
#TODO tratar tela de CFOP da capa
|
434
479
|
console.print(
|
435
480
|
"Verificando a existencia de POP-UP de Itens que Ultrapassam a Variação Máxima de Custo ...\n"
|
436
481
|
)
|
@@ -454,7 +499,10 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
454
499
|
main_window = app["TFrmTelaSelecao"]
|
455
500
|
send_keys("%o")
|
456
501
|
|
457
|
-
await worker_sleep(
|
502
|
+
await worker_sleep(3)
|
503
|
+
|
504
|
+
await emsys.verify_warning_and_error("Aviso", "OK")
|
505
|
+
|
458
506
|
console.print(
|
459
507
|
"Verificando a existencia de Warning informando que a Soma dos pagamentos não bate com o valor da nota. ...\n"
|
460
508
|
)
|
@@ -575,7 +623,50 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
575
623
|
retorno=f"Warning não mapeado para seguimento do robo, mensagem: {captured_text}",
|
576
624
|
status=RpaHistoricoStatusEnum.Falha,
|
577
625
|
)
|
626
|
+
|
627
|
+
await emsys.verify_warning_and_error("Aviso", "OK")
|
628
|
+
|
629
|
+
await worker_sleep(3)
|
630
|
+
|
631
|
+
#Alterar NOP
|
632
|
+
try:
|
633
|
+
for attempt in range(2):
|
634
|
+
console.print("Alterando a NOP...\n")
|
635
|
+
pyautogui.click(618, 330)
|
636
|
+
await worker_sleep(2)
|
637
|
+
nop_value = "1152 - ENTRADAS P/ TRANSFERENCIAS DE MERCADORIA- 1.152"
|
638
|
+
console.print(f"Inserindo a informação da NOP: {nop_value} ...\n")
|
639
|
+
await worker_sleep(5)
|
640
|
+
set_combobox("||List", nop_value)
|
641
|
+
await worker_sleep(2)
|
642
|
+
pyautogui.hotkey("enter")
|
643
|
+
await worker_sleep(8)
|
644
|
+
console.print("Teste")
|
645
|
+
await emsys.verify_warning_and_error("Aviso", "OK")
|
646
|
+
await emsys.incluir_registro()
|
647
|
+
retorno = await verify_nf_incuded()
|
648
|
+
await worker_sleep(40)
|
649
|
+
if retorno:
|
650
|
+
break
|
578
651
|
|
652
|
+
console.print("\nVerifica se a nota ja foi lançada...")
|
653
|
+
nf_chave_acesso = int(nota.get("nfe"))
|
654
|
+
status_nf_emsys = await get_status_nf_emsys(nf_chave_acesso)
|
655
|
+
if status_nf_emsys.get("status") != "Lançada":
|
656
|
+
|
657
|
+
return RpaRetornoProcessoDTO(
|
658
|
+
sucesso=False,
|
659
|
+
retorno=f"Erro na validação de CFOP, foi encontrado mais de uma opção com a mesma informação",
|
660
|
+
status=RpaHistoricoStatusEnum.Falha,
|
661
|
+
)
|
662
|
+
|
663
|
+
except:
|
664
|
+
return RpaRetornoProcessoDTO(
|
665
|
+
sucesso=False,
|
666
|
+
retorno=f"Erro ao alterar o NOP",
|
667
|
+
status=RpaHistoricoStatusEnum.Falha,
|
668
|
+
)
|
669
|
+
|
579
670
|
await worker_sleep(3)
|
580
671
|
retorno = False
|
581
672
|
try:
|
@@ -588,10 +679,11 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
588
679
|
break
|
589
680
|
else:
|
590
681
|
console.print(f"Aguardando confirmação de nota incluida...\n")
|
591
|
-
await worker_sleep(
|
682
|
+
await worker_sleep(4)
|
592
683
|
i += 1
|
593
684
|
|
594
685
|
information_pop_up = await is_window_open("Information")
|
686
|
+
|
595
687
|
if information_pop_up["IsOpened"] == True:
|
596
688
|
app = Application().connect(class_name="TFrmNotaFiscalEntrada")
|
597
689
|
main_window = app["Information"]
|
@@ -645,6 +737,7 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
645
737
|
)
|
646
738
|
else:
|
647
739
|
console.print(f"Aba Information não encontrada")
|
740
|
+
print("romero brito?")
|
648
741
|
retorno = await verify_nf_incuded()
|
649
742
|
|
650
743
|
except Exception as e:
|
@@ -655,6 +748,9 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
655
748
|
status=RpaHistoricoStatusEnum.Falha,
|
656
749
|
)
|
657
750
|
|
751
|
+
await emsys.verify_warning_and_error("Aviso", "OK")
|
752
|
+
await emsys.verify_warning_and_error("Aviso", "&OK")
|
753
|
+
|
658
754
|
if retorno:
|
659
755
|
console.print("\nNota lançada com sucesso...", style="bold green")
|
660
756
|
await worker_sleep(6)
|
@@ -613,10 +613,10 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
613
613
|
app = Application().connect(title="Informação")
|
614
614
|
dialog = app.window(title="Informação")
|
615
615
|
|
616
|
-
|
617
|
-
if
|
616
|
+
btn_yes = dialog.child_window(title="OK", class_name="Button")
|
617
|
+
if btn_yes.exists():
|
618
618
|
try:
|
619
|
-
|
619
|
+
btn_yes.click()
|
620
620
|
await worker_sleep(3)
|
621
621
|
console.print(
|
622
622
|
"O botão OK de pré-venda incluída foi clicado com sucesso.",
|
@@ -632,7 +632,6 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
632
632
|
retorno=f"Falha ao clicar no botão OK de pré-venda incluída: {e}",
|
633
633
|
status=RpaHistoricoStatusEnum.Falha,
|
634
634
|
)
|
635
|
-
|
636
635
|
else:
|
637
636
|
|
638
637
|
console.print(
|
@@ -656,22 +655,66 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
656
655
|
|
657
656
|
await worker_sleep(3)
|
658
657
|
|
659
|
-
screenshot_path = take_screenshot()
|
658
|
+
# screenshot_path = take_screenshot()
|
660
659
|
# Message 'Deseja pesquisar pré-venda?'
|
661
660
|
console.print(
|
662
661
|
"Verificando a existencia da mensagem: 'Deseja pesquisar pré-venda?'...\n"
|
663
662
|
)
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
663
|
+
try:
|
664
|
+
app = Application().connect(title="Confirm")
|
665
|
+
dialog_prevenda = app.window(title="Confirm")
|
666
|
+
|
667
|
+
btn_yes = dialog_prevenda.child_window(title="&Yes", class_name="TButton")
|
668
|
+
if btn_yes.exists():
|
669
|
+
try:
|
670
|
+
btn_yes.click()
|
671
|
+
await worker_sleep(3)
|
672
|
+
console.print(
|
673
|
+
"O botão YES de pesquisa pré-venda incluída foi clicado com sucesso.",
|
674
|
+
style="green",
|
675
|
+
)
|
676
|
+
except Exception as e:
|
677
|
+
console.print(
|
678
|
+
f"Falha ao clicar no botão YES de pesquisa pré-venda incluída: {e}",
|
679
|
+
style="red",
|
680
|
+
)
|
681
|
+
return RpaRetornoProcessoDTO(
|
682
|
+
sucesso=False,
|
683
|
+
retorno=f"Falha ao clicar no botão YES de pesquisa pré-venda incluída: {e}",
|
684
|
+
status=RpaHistoricoStatusEnum.Falha,
|
685
|
+
)
|
669
686
|
else:
|
670
|
-
|
671
|
-
console.
|
672
|
-
|
673
|
-
|
674
|
-
|
687
|
+
|
688
|
+
console.print(
|
689
|
+
"O Botão OK de pré-venda incluída não foi encontrado.", style="red"
|
690
|
+
)
|
691
|
+
return RpaRetornoProcessoDTO(
|
692
|
+
sucesso=False,
|
693
|
+
retorno="O Botão YES de pesquisa pré-venda incluída não foi encontrado.",
|
694
|
+
status=RpaHistoricoStatusEnum.Falha,
|
695
|
+
)
|
696
|
+
|
697
|
+
except Exception as e:
|
698
|
+
console.print(
|
699
|
+
f"O Botão YES de pesquisa pré-venda incluída não foi encontrado: {e}", style="red"
|
700
|
+
)
|
701
|
+
return RpaRetornoProcessoDTO(
|
702
|
+
sucesso=False,
|
703
|
+
retorno=f"O Botão YES de pesquisa pré-venda incluída não foi encontrado: {e}",
|
704
|
+
status=RpaHistoricoStatusEnum.Falha,
|
705
|
+
)
|
706
|
+
|
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")
|
675
718
|
await worker_sleep(5)
|
676
719
|
|
677
720
|
# screenshot_path = take_screenshot()
|
@@ -767,7 +810,7 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
767
810
|
pyautogui.click(pre_venda_sucesso)
|
768
811
|
console.log('Clicou em "OK" na mensagem de sucesso', style="bold green")
|
769
812
|
|
770
|
-
await worker_sleep(
|
813
|
+
await worker_sleep(10)
|
771
814
|
|
772
815
|
# Faturando Pre-venda
|
773
816
|
retorno = await faturar_pre_venda(task)
|
@@ -856,5 +899,4 @@ async def transferencias(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoDTO:
|
|
856
899
|
sucesso=False,
|
857
900
|
retorno=log_msg,
|
858
901
|
status=RpaHistoricoStatusEnum.Falha,
|
859
|
-
)
|
860
|
-
|
902
|
+
)
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/api/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/api/ahead_service.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/api/client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/config/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/config/settings.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/decorators/repeat.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/decorators/retry.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/decorators/timeit.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/models/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/tasks/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/__init__.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/env.py
RENAMED
File without changes
|
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/logger.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/toast.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/updater.py
RENAMED
File without changes
|
{worker_automate_hub-0.4.402 → worker_automate_hub-0.4.404}/worker_automate_hub/utils/util.py
RENAMED
File without changes
|
File without changes
|
File without changes
|