Interface CssSupport

  • All Known Implementing Classes:
    CssSupportImpl

    public interface CssSupport
    Features related to CSS loaded in the active page.
    See Also:
    CssControl
    • Method Detail

      • inject

        void inject​(String cssSource)
        Inject CSS into active page.

        Additional escaping might be necessary depending on in what form the source if provided.

        Example:

         @Test
         public void testMethod() {
              css().inject("#location {display: none}");
              css().inject("#location {\ndisplay: none\n}");
         }
         
        Parameters:
        cssSource - css source to inject
      • injectResource

        void injectResource​(String cssResource)
        Inject CSS classpath resource into active page.

        Example:

         @Test
         public void testMethod() {
              css().injectResource("/path/to/css/resource.css");
         }
         
        Parameters:
        cssResource - css classpath resource to inject