java.lang.Object
org.openqa.selenium.devtools.v129.css.model.CSSMedia

public class CSSMedia extends Object
CSS media rule descriptor.
  • Constructor Details

  • Method Details

    • getText

      public String getText()
      Media query text.
    • getSource

      public CSSMedia.Source getSource()
      Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.
    • getSourceURL

      public Optional<String> getSourceURL()
      URL of the document containing the media query description.
    • getRange

      public Optional<SourceRange> getRange()
      The associated rule (@media or @import) header range in the enclosing stylesheet (if available).
    • getStyleSheetId

      public Optional<StyleSheetId> getStyleSheetId()
      Identifier of the stylesheet containing this object (if exists).
    • getMediaList

      public Optional<List<MediaQuery>> getMediaList()
      Array of media queries.