
Documentation
Thanks to the flexible system, every element in a document can be checked for existence. There are several ways to select an element, since not all selectors are equally easy to use.
Leankoala distinguishes between two sources on which the checks can be performed. On the one hand, the HTML document can be used as the basis. This source contains the HTML that is delivered directly from the server and has not yet been processed by the browser. This source is very stable and causes hardly any false positives. If a page is barely modified by JavaScript, it is recommended to select the HTML content.
The second option is to select the DOM document as the source. This includes the HTML as rendered by the browser. This is necessary to test JavaScript applications like vue, angular or react, which display all information only in the browser.
Editorially maintained websites can be challenging if they are very advertising intensive. Advertising is often not neatly programmed and leads to syntactically incorrect HTML code. In this case, all checks that can be covered by HTML as a source should use this. The others where it is important to check the DOM should use it. This should not be many.
Sometimes it is not easy creating stable selectors that are still valid after the next deployment or code change. There are some tricks and helpers for doing it.