Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

167
Visualizações
WebView2 / CoreWebView2 - Detecting if a javascript error happens

I have written a web-crawler to test a pre-release website for errors and issues (i.e. missing content type, timeouts, exceptions, redirects).

This morning a colleague asked me to include a check if there was any javascript error on the page...

A pure javascript solution is unlikely -- i.e. detect all JS errors, using JS

What I appear to want to be able to do is capture the javascript console text, ideally via CoreWebView2

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If the page logs each exception into an array,

Errors=[] window.onerror = function (msg, url, line) { Errors.push("Caught[via window.onerror]: '" + msg + "' from " + url + ":" + line); return true; };

Then you can just query the Errors and see both the count and the nature of the errors.

You can also push errors from try catch

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda