Table of Contents

Class CSSAdapter

Namespace
OpenQA.Selenium.DevTools.V131.CSS
Assembly
WebDriver.dll

Represents an adapter for the CSS domain to simplify the command interface.

public class CSSAdapter
Inheritance
CSSAdapter
Inherited Members

Constructors

CSSAdapter(IDevToolsSession)

Initializes a new instance of the CSSAdapter class.

public CSSAdapter(IDevToolsSession session)

Parameters

session IDevToolsSession

The IDevToolsSession to be used with this adapter.

Properties

Session

Gets the DevToolsSession associated with the adapter.

public IDevToolsSession Session { get; }

Property Value

IDevToolsSession

Methods

AddRule(AddRuleCommandSettings, CancellationToken, int?, bool)

addRule

public Task<AddRuleCommandResponse> AddRule(AddRuleCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command AddRuleCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<AddRuleCommandResponse>

CollectClassNames(CollectClassNamesCommandSettings, CancellationToken, int?, bool)

collectClassNames

public Task<CollectClassNamesCommandResponse> CollectClassNames(CollectClassNamesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CollectClassNamesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CollectClassNamesCommandResponse>

CreateStyleSheet(CreateStyleSheetCommandSettings, CancellationToken, int?, bool)

createStyleSheet

public Task<CreateStyleSheetCommandResponse> CreateStyleSheet(CreateStyleSheetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command CreateStyleSheetCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<CreateStyleSheetCommandResponse>

Disable(DisableCommandSettings, CancellationToken, int?, bool)

disable

public Task<DisableCommandResponse> Disable(DisableCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command DisableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<DisableCommandResponse>

Enable(EnableCommandSettings, CancellationToken, int?, bool)

enable

public Task<EnableCommandResponse> Enable(EnableCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command EnableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<EnableCommandResponse>

ForcePseudoState(ForcePseudoStateCommandSettings, CancellationToken, int?, bool)

forcePseudoState

public Task<ForcePseudoStateCommandResponse> ForcePseudoState(ForcePseudoStateCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command ForcePseudoStateCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<ForcePseudoStateCommandResponse>

GetBackgroundColors(GetBackgroundColorsCommandSettings, CancellationToken, int?, bool)

getBackgroundColors

public Task<GetBackgroundColorsCommandResponse> GetBackgroundColors(GetBackgroundColorsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetBackgroundColorsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetBackgroundColorsCommandResponse>

GetComputedStyleForNode(GetComputedStyleForNodeCommandSettings, CancellationToken, int?, bool)

getComputedStyleForNode

public Task<GetComputedStyleForNodeCommandResponse> GetComputedStyleForNode(GetComputedStyleForNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetComputedStyleForNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetComputedStyleForNodeCommandResponse>

GetInlineStylesForNode(GetInlineStylesForNodeCommandSettings, CancellationToken, int?, bool)

getInlineStylesForNode

public Task<GetInlineStylesForNodeCommandResponse> GetInlineStylesForNode(GetInlineStylesForNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetInlineStylesForNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetInlineStylesForNodeCommandResponse>

GetLayersForNode(GetLayersForNodeCommandSettings, CancellationToken, int?, bool)

getLayersForNode

public Task<GetLayersForNodeCommandResponse> GetLayersForNode(GetLayersForNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetLayersForNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetLayersForNodeCommandResponse>

GetLocationForSelector(GetLocationForSelectorCommandSettings, CancellationToken, int?, bool)

getLocationForSelector

public Task<GetLocationForSelectorCommandResponse> GetLocationForSelector(GetLocationForSelectorCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetLocationForSelectorCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetLocationForSelectorCommandResponse>

GetMatchedStylesForNode(GetMatchedStylesForNodeCommandSettings, CancellationToken, int?, bool)

getMatchedStylesForNode

public Task<GetMatchedStylesForNodeCommandResponse> GetMatchedStylesForNode(GetMatchedStylesForNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetMatchedStylesForNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetMatchedStylesForNodeCommandResponse>

GetMediaQueries(GetMediaQueriesCommandSettings, CancellationToken, int?, bool)

getMediaQueries

public Task<GetMediaQueriesCommandResponse> GetMediaQueries(GetMediaQueriesCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetMediaQueriesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetMediaQueriesCommandResponse>

GetPlatformFontsForNode(GetPlatformFontsForNodeCommandSettings, CancellationToken, int?, bool)

getPlatformFontsForNode

public Task<GetPlatformFontsForNodeCommandResponse> GetPlatformFontsForNode(GetPlatformFontsForNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetPlatformFontsForNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetPlatformFontsForNodeCommandResponse>

GetStyleSheetText(GetStyleSheetTextCommandSettings, CancellationToken, int?, bool)

getStyleSheetText

public Task<GetStyleSheetTextCommandResponse> GetStyleSheetText(GetStyleSheetTextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command GetStyleSheetTextCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetStyleSheetTextCommandResponse>

SetContainerQueryText(SetContainerQueryTextCommandSettings, CancellationToken, int?, bool)

setContainerQueryText

public Task<SetContainerQueryTextCommandResponse> SetContainerQueryText(SetContainerQueryTextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetContainerQueryTextCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetContainerQueryTextCommandResponse>

SetEffectivePropertyValueForNode(SetEffectivePropertyValueForNodeCommandSettings, CancellationToken, int?, bool)

setEffectivePropertyValueForNode

public Task<SetEffectivePropertyValueForNodeCommandResponse> SetEffectivePropertyValueForNode(SetEffectivePropertyValueForNodeCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetEffectivePropertyValueForNodeCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetEffectivePropertyValueForNodeCommandResponse>

SetKeyframeKey(SetKeyframeKeyCommandSettings, CancellationToken, int?, bool)

setKeyframeKey

public Task<SetKeyframeKeyCommandResponse> SetKeyframeKey(SetKeyframeKeyCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetKeyframeKeyCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetKeyframeKeyCommandResponse>

SetLocalFontsEnabled(SetLocalFontsEnabledCommandSettings, CancellationToken, int?, bool)

setLocalFontsEnabled

public Task<SetLocalFontsEnabledCommandResponse> SetLocalFontsEnabled(SetLocalFontsEnabledCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetLocalFontsEnabledCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetLocalFontsEnabledCommandResponse>

SetMediaText(SetMediaTextCommandSettings, CancellationToken, int?, bool)

setMediaText

public Task<SetMediaTextCommandResponse> SetMediaText(SetMediaTextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetMediaTextCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetMediaTextCommandResponse>

SetPropertyRulePropertyName(SetPropertyRulePropertyNameCommandSettings, CancellationToken, int?, bool)

setPropertyRulePropertyName

public Task<SetPropertyRulePropertyNameCommandResponse> SetPropertyRulePropertyName(SetPropertyRulePropertyNameCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetPropertyRulePropertyNameCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetPropertyRulePropertyNameCommandResponse>

SetRuleSelector(SetRuleSelectorCommandSettings, CancellationToken, int?, bool)

setRuleSelector

public Task<SetRuleSelectorCommandResponse> SetRuleSelector(SetRuleSelectorCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetRuleSelectorCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetRuleSelectorCommandResponse>

SetScopeText(SetScopeTextCommandSettings, CancellationToken, int?, bool)

setScopeText

public Task<SetScopeTextCommandResponse> SetScopeText(SetScopeTextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetScopeTextCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetScopeTextCommandResponse>

SetStyleSheetText(SetStyleSheetTextCommandSettings, CancellationToken, int?, bool)

setStyleSheetText

public Task<SetStyleSheetTextCommandResponse> SetStyleSheetText(SetStyleSheetTextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetStyleSheetTextCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetStyleSheetTextCommandResponse>

SetStyleTexts(SetStyleTextsCommandSettings, CancellationToken, int?, bool)

setStyleTexts

public Task<SetStyleTextsCommandResponse> SetStyleTexts(SetStyleTextsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetStyleTextsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetStyleTextsCommandResponse>

SetSupportsText(SetSupportsTextCommandSettings, CancellationToken, int?, bool)

setSupportsText

public Task<SetSupportsTextCommandResponse> SetSupportsText(SetSupportsTextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command SetSupportsTextCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetSupportsTextCommandResponse>

StartRuleUsageTracking(StartRuleUsageTrackingCommandSettings, CancellationToken, int?, bool)

startRuleUsageTracking

public Task<StartRuleUsageTrackingCommandResponse> StartRuleUsageTracking(StartRuleUsageTrackingCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command StartRuleUsageTrackingCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<StartRuleUsageTrackingCommandResponse>

StopRuleUsageTracking(StopRuleUsageTrackingCommandSettings, CancellationToken, int?, bool)

stopRuleUsageTracking

public Task<StopRuleUsageTrackingCommandResponse> StopRuleUsageTracking(StopRuleUsageTrackingCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command StopRuleUsageTrackingCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<StopRuleUsageTrackingCommandResponse>

TakeComputedStyleUpdates(TakeComputedStyleUpdatesCommandSettings, CancellationToken, int?, bool)

takeComputedStyleUpdates

public Task<TakeComputedStyleUpdatesCommandResponse> TakeComputedStyleUpdates(TakeComputedStyleUpdatesCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command TakeComputedStyleUpdatesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<TakeComputedStyleUpdatesCommandResponse>

TakeCoverageDelta(TakeCoverageDeltaCommandSettings, CancellationToken, int?, bool)

takeCoverageDelta

public Task<TakeCoverageDeltaCommandResponse> TakeCoverageDelta(TakeCoverageDeltaCommandSettings command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command TakeCoverageDeltaCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<TakeCoverageDeltaCommandResponse>

TrackComputedStyleUpdates(TrackComputedStyleUpdatesCommandSettings, CancellationToken, int?, bool)

trackComputedStyleUpdates

public Task<TrackComputedStyleUpdatesCommandResponse> TrackComputedStyleUpdates(TrackComputedStyleUpdatesCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)

Parameters

command TrackComputedStyleUpdatesCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<TrackComputedStyleUpdatesCommandResponse>

Events

FontsUpdated

fontsUpdated

public event EventHandler<FontsUpdatedEventArgs> FontsUpdated

Event Type

EventHandler<FontsUpdatedEventArgs>

MediaQueryResultChanged

mediaQueryResultChanged

public event EventHandler<MediaQueryResultChangedEventArgs> MediaQueryResultChanged

Event Type

EventHandler<MediaQueryResultChangedEventArgs>

StyleSheetAdded

styleSheetAdded

public event EventHandler<StyleSheetAddedEventArgs> StyleSheetAdded

Event Type

EventHandler<StyleSheetAddedEventArgs>

StyleSheetChanged

styleSheetChanged

public event EventHandler<StyleSheetChangedEventArgs> StyleSheetChanged

Event Type

EventHandler<StyleSheetChangedEventArgs>

StyleSheetRemoved

styleSheetRemoved

public event EventHandler<StyleSheetRemovedEventArgs> StyleSheetRemoved

Event Type

EventHandler<StyleSheetRemovedEventArgs>