I'm trying to do an URL test based on the content of the page. The page shouldn't contain the words "ERROR" or "ALERT". The problem is it isn't working the way it should, even when the page has the words hostmon does not change the status to bad.
Any ideas ?
You use wrong option: Shouldn't contain: "Erro" or "Alert". If you want to check more than one string constant, set "Use expression: not ("Erro" or "Alert")" option.
BTW: I have checked URL and I see your page contains static script with words "Alerta", "Sucesso", "Erro". So, HostMonitor will set status to "Bad context".
HostMonitor does not look on page like people, it checks source code of the page.
How can I test a page for the presence of this string (var strOverallStatus = "Sucesso")? Notice that the string already contains double quotas on it. I have tried but always get bad result.
Use "should contain" or "shouldn't contain" option. HostMonitor process quotation mark only when you set "use expression" option. And even in case of expression there is solution: '(var strOverallStatus = "Sucesso")'