Class AllElementsObscure

  • All Implemented Interfaces:
    AutoCloseable
    Direct Known Subclasses:
    ObscureAll

    public class AllElementsObscure
    extends Object
    implements AutoCloseable
    An AutoCloseable that allows to make a list of given elements temporarily invisible, so that the image can be captured/asserted while ignoring certain DOM elements. When closing, the DOM is reversed to the original state. The difference between ElementObsceure and AllElementObscure is that ElementObscure obscures the first match for each path, and AllElementsObscure obscures all the matches. Also, AllElementsObscure does not throw if there are no matches.
    • Constructor Detail

      • AllElementsObscure

        public AllElementsObscure​(InBrowser browser,
                                  Path element)
      • AllElementsObscure

        public AllElementsObscure​(InBrowser browser,
                                  List<Path> elements)
      • AllElementsObscure

        public AllElementsObscure​(InBrowser browser,
                                  List<Path> elements,
                                  boolean strict)
    • Method Detail

      • getObscuredElements

        public List<Path> getObscuredElements()
      • getNumberOfElementsObscured

        public int getNumberOfElementsObscured()