Structs§

  • DocumentWrapper is wrapper struct around web_sys::Document. We use to allow effortless implementation of DomQuery trait on any struct that holds onto a web_sys::Document
  • TestElement is a wrapper around web_sys::HtmlElement, we supply some helper functions while implementing Deref so you can use any web_sys::HtmlElement method on TestElement.

Enums§

Traits§

  • DomQuery is a trait that is implement on a data structure that holds onto the document for the test. The get_by_X series tries to get exactly one element given the input by method of X They return an Error::NotFound result if 0, or a MoreThanOne error if more than one. The get_all_by_X series returns a list of 0 or more items given the input by method of ˙˙˙
  • If a struct holds onto an element it can automatically implement DomQuery. ElementWrapper is just the wrapper around web_sys::Element So this could be implemented as follows