Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
jhowbhz committed Sep 23, 2023
1 parent 5c39abb commit 52a4892
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dist/controllers/SCController.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class SCController {
console.log('click buttonSubmitReload');
try {
const textoNotFound = "Nenhuma multa em aberto cadastrada para este veículo até o momento.";
const textCaptchaInvalid = "Problema de acesso a página. Recaptcha inválido. Consulte novamente";
await pageReload.waitForNavigation({ waitUntil: 'networkidle2', timeout: 10000 });
const html = await pageReload.content();
console.log('html', html);
Expand All @@ -97,6 +98,11 @@ class SCController {
await pageReload.close();
return { placa, renavam, multas: [], message: 'Nenhuma multa em aberto cadastrada para este veículo até o momento.' };
}
if (html.includes(textCaptchaInvalid)) {
console.log('Problema de acesso a página. Recaptcha inválido. Consulte novamente');
await pageReload.close();
return { placa, renavam, multas: [], message: 'Problema de acesso a página. Recaptcha inválido. Consulte novamente' };
}
console.log('open pageReload', pageReload.url());
//new page with captcha solver
await pageReload.waitForSelector('table[bgcolor="white"]', { timeout: 10000 });
Expand Down

0 comments on commit 52a4892

Please sign in to comment.