Function: hasFeature()
hasFeature(
feature):boolean
Returns whether a specific Playwright feature is available.
Parameters
feature
keyof PlaywrightFeatures
Feature flag key from PlaywrightFeatures.
Returns
boolean
True if the installed Playwright version supports the feature.
Example
if (hasFeature('hasAriaSnapshot')) {
// aria snapshot assertions available
}