I have a Testcafe test that looks for a link and clicks on it. Depending on the environment that I run it in, it may or may not be a valid link, and that is okay. What matters is that the link is found and clicked on, not that it goes to a valid page. For example, it may go to a domain that does not exist.
How can I ignore the error resulting from the click() call? I tried suppressing it in a try/catch, but it did not work.
Another alternative, how can I mark the testcase as XFAIL, so that it will be treated as an expected failure?
Aucun commentaire:
Enregistrer un commentaire