Class ObscureAll

  • All Implemented Interfaces:
    AutoCloseable

    public class ObscureAll
    extends AllElementsObscure
    implements AutoCloseable
    class that allows to hide elements temporarily. This is useful when doing visual testing, while ignoring elements that are not interesting for the test. For example - testing a chart while ignoring certain labels. This is an Autocloseable: it reverts to the original state when leaving the try{} block.
    • Constructor Detail

      • ObscureAll

        public ObscureAll​(Path element)
        Make the first element matching the given path temporarily hidden. If the element is not found, it ignores it.
        Parameters:
        element - the path of the element to obscure
      • ObscureAll

        public ObscureAll​(List<Path> elements)
        Make the elements matching the given paths temporarily hidden. In case there are multiple matches, it will hide the first one. If the element is not found, it ignores it.
        Parameters:
        elements - the elements to obscure
      • ObscureAll

        public ObscureAll​(List<Path> elements,
                          boolean strict)
        Make the elements matching the given paths temporarily hidden. In case there are multiple matches, it will hide the first one.
        Parameters:
        elements - the elements to obscure
        strict - in strict mode, if the element is not found, it throws am exception and stops