Skip to main content
Version: 1.x

Variable: capabilities

const capabilities: object

Consumer-facing capabilities introspection API.

Type Declaration​

byCategory​

readonly byCategory: (category) => object[]

Returns capabilities matching the given category.

Parameters​

category​

"ui5" | "auth" | "navigate" | "table" | "dialog" | "date" | "odata" | "fe" | "intent" | "flp" | "shell" | "footer" | "ai" | "data" | "assert"

Returns​

byNamespace​

readonly byNamespace: (namespace) => object[]

Returns capabilities matching the given namespace prefix.

Parameters​

namespace​

string

Returns​

describe​

readonly describe: (name) => string | undefined

Returns a human-readable description of a named capability.

Parameters​

name​

string

Returns​

string | undefined

find​

readonly find: (query) => object[]

Searches capabilities by substring match on name or description.

Parameters​

query​

string

Returns​

findByName​

readonly findByName: (name) => { aiSteering?: string; async?: boolean; category: "ui5" | "auth" | "navigate" | "table" | "dialog" | "date" | "odata" | "fe" | "intent" | "flp" | "shell" | "footer" | "ai" | "data" | "assert"; controlTypes?: string[]; description: string; id: string; intent?: string; name: string; priority: "fixture" | "namespace" | "implementation"; qualifiedName: string; registryVersion: 1; sapModule?: string; usageExample: string; } | undefined

Returns the first entry matching the given name, or undefined.

Parameters​

name​

string

Returns​

Type Literal​

{ aiSteering?: string; async?: boolean; category: "ui5" | "auth" | "navigate" | "table" | "dialog" | "date" | "odata" | "fe" | "intent" | "flp" | "shell" | "footer" | "ai" | "data" | "assert"; controlTypes?: string[]; description: string; id: string; intent?: string; name: string; priority: "fixture" | "namespace" | "implementation"; qualifiedName: string; registryVersion: 1; sapModule?: string; usageExample: string; }

aiSteering?​

optional aiSteering?: string

AI agent steering — tells agents to prefer a higher-level alternative.

async?​

optional async?: boolean

Whether this is an async method.

category​

category: "ui5" | "auth" | "navigate" | "table" | "dialog" | "date" | "odata" | "fe" | "intent" | "flp" | "shell" | "footer" | "ai" | "data" | "assert" = CapabilityCategorySchema

Logical grouping for filtering.

controlTypes?​

optional controlTypes?: string[]

UI5 control types this capability works with.

description​

description: string

One-sentence description of what this capability does.

id​

id: string

Unique identifier in UI5-PREFIX-NNN format.

intent?​

optional intent?: string

Optional intent tag.

name​

name: string

Human-readable function or method name.

priority​

priority: "fixture" | "namespace" | "implementation" = CapabilityPrioritySchema

REQUIRED priority tier.

qualifiedName​

qualifiedName: string

Dot-separated agent-friendly name, e.g. 'ui5.table.getRows'.

registryVersion​

registryVersion: 1

Registry schema version for forward compatibility.

sapModule?​

optional sapModule?: string

Optional SAP UI5 module tag.

usageExample​

usageExample: string

Ready-to-run usage example string.


undefined

forAI​

readonly forAI: () => CapabilitiesJSON

Returns structured JSON optimised for AI agent consumption.

Returns​

CapabilitiesJSON

forControl​

readonly forControl: (controlType) => object[]

Returns capabilities relevant to a specific UI5 control type.

Parameters​

controlType​

string

Returns​

forProvider​

readonly forProvider: (provider) => string

Returns capabilities formatted for a specific AI provider.

Parameters​

provider​

"claude" | "openai" | "gemini"

Returns​

string

get​

readonly get: (id) => { aiSteering?: string; async?: boolean; category: "ui5" | "auth" | "navigate" | "table" | "dialog" | "date" | "odata" | "fe" | "intent" | "flp" | "shell" | "footer" | "ai" | "data" | "assert"; controlTypes?: string[]; description: string; id: string; intent?: string; name: string; priority: "fixture" | "namespace" | "implementation"; qualifiedName: string; registryVersion: 1; sapModule?: string; usageExample: string; } | undefined

Looks up a capability by its kebab-case ID.

Parameters​

id​

string

Returns​

Type Literal​

{ aiSteering?: string; async?: boolean; category: "ui5" | "auth" | "navigate" | "table" | "dialog" | "date" | "odata" | "fe" | "intent" | "flp" | "shell" | "footer" | "ai" | "data" | "assert"; controlTypes?: string[]; description: string; id: string; intent?: string; name: string; priority: "fixture" | "namespace" | "implementation"; qualifiedName: string; registryVersion: 1; sapModule?: string; usageExample: string; }

aiSteering?​

optional aiSteering?: string

AI agent steering — tells agents to prefer a higher-level alternative.

async?​

optional async?: boolean

Whether this is an async method.

category​

category: "ui5" | "auth" | "navigate" | "table" | "dialog" | "date" | "odata" | "fe" | "intent" | "flp" | "shell" | "footer" | "ai" | "data" | "assert" = CapabilityCategorySchema

Logical grouping for filtering.

controlTypes?​

optional controlTypes?: string[]

UI5 control types this capability works with.

description​

description: string

One-sentence description of what this capability does.

id​

id: string

Unique identifier in UI5-PREFIX-NNN format.

intent?​

optional intent?: string

Optional intent tag.

name​

name: string

Human-readable function or method name.

priority​

priority: "fixture" | "namespace" | "implementation" = CapabilityPrioritySchema

REQUIRED priority tier.

qualifiedName​

qualifiedName: string

Dot-separated agent-friendly name, e.g. 'ui5.table.getRows'.

registryVersion​

registryVersion: 1

Registry schema version for forward compatibility.

sapModule?​

optional sapModule?: string

Optional SAP UI5 module tag.

usageExample​

usageExample: string

Ready-to-run usage example string.


undefined

getCategories​

readonly getCategories: () => readonly ("ui5" | "auth" | "navigate" | "table" | "dialog" | "date" | "odata" | "fe" | "intent" | "flp" | "shell" | "footer" | "ai" | "data" | "assert")[]

Returns unique category names across all registered capabilities.

Returns​

readonly ("ui5" | "auth" | "navigate" | "table" | "dialog" | "date" | "odata" | "fe" | "intent" | "flp" | "shell" | "footer" | "ai" | "data" | "assert")[]

getStatistics​

readonly getStatistics: () => CapabilityStats

Returns a statistical summary of the registry.

Returns​

CapabilityStats

has​

readonly has: (name) => boolean

Returns true if a capability with the given name is registered.

Parameters​

name​

string

Returns​

boolean

list​

readonly list: () => object[]

Returns all registered capability entries.

Returns​

listByPriority​

readonly listByPriority: (priority) => object[]

Returns entries matching the given priority tier.

Parameters​

priority​

"fixture" | "namespace" | "implementation"

Returns​

listFixtures​

readonly listFixtures: () => object[]

Returns entries with priority === 'fixture' (Playwright best practice).

Returns​

registry​

registry: CapabilityRegistry

The underlying registry instance (for advanced usage like register()).

toJSON​

readonly toJSON: () => CapabilitiesJSON

Exports the full registry as structured JSON.

Returns​

CapabilitiesJSON

Intent​

Provide drop-in parity with mk's capabilities object.

Capability​

pramanAI.capabilities

Example​

import { capabilities } from 'playwright-praman';

if (capabilities.has('clickButton')) {
const cap = capabilities.findByName('clickButton');
}