I have a big site to test. After every click it could be an error on page such as Warning, Fatal error, etc. So after every click i must check innertext (or innerHTML) of the page on this errors.
Now i do it with one big regex: ((?<error>(Warning|Fatal error|Parse error)\:.+?\s+on\s+line\s+\d+)|(?<nac>is not a component)|(?<dberror>(mssql|mysql|oracle)\s+query\s+error:)|(?<404>404 not found)|(?<cannotfind>can not find.*template with page)|(?<exception>exception)|(?<serverError>server error)|(?<isnotinstalled>is not installed))
I mean i check innertext of every page this regex. It works but slow. Any other faster solutions?
Driver.PageSource.Contains(‘any word’)
This is a fast way byt not confident